wildcard-mapping

How do I handle multiple actions in single form in WILDCARD action mapping?

邮差的信 提交于 2021-02-08 06:59:24
问题 According this solution Struts2 handle multiple actions... I know the Struts2 DMI can handle multiple acitons in single form easily. Recently, Struts2 turned off DMI mechanism for security issue. Now, we use WILDCARD MAPPINGS to map all actions in struts.xml example: <action name="*/*" class="action.{1}Action" method="{2}"> ... </action> In WILDARD MAPPINGS, it has a little problem to deal with mapping multiple actions/methods in single form. <s:form action="actionA/method2" theme="simple" >

Tiles2 Wildcard not working

风流意气都作罢 提交于 2021-02-04 21:28:10
问题 I'm using Spring-Struts2-Tiles2 in my project and I'm trying to use wildcard notation here to remove the duplicate in my setup from here <definition name="home-template1" template="/WEB-INF/jsp/templates/template1.jsp"> <put-attribute name="banner" value="/WEB-INF/jsp/sitePages/banner.jsp" /> <put-attribute name="header" value="/WEB-INF/jsp/sitePages/header.jsp" /> <put-attribute name="body" value="/WEB-INF/jsp/sitePages/body.jsp" /> <put-attribute name="archive" value="/WEB-INF/jsp/sitePages

How to apply a global dynamic result path prefix in Struts 2 so can reskin JSPs?

狂风中的少年 提交于 2019-12-25 04:15:41
问题 I have a website using Struts2 as the MVC framework. I need to re-skin the JSPs. I need to have the old JSPs accessible alongside the new JSPs. So I have added a root folder of /newdesign/ and copied all of the existing JSP folders into it. So if I login with the name/value pair ?newdesign=true (for example) I'm the initial request then I can: store this in the user's session and then dynamically add /newdesign/ as a global prefix to the tag in struts.xml that determines if the new or old JSP

Mapping classic asp pages to .net in IIS

a 夏天 提交于 2019-12-22 05:28:12
问题 I'm trying to map requests for classic asp pages to be handled by .net, so that it runs through a custom httpmodule. In IIS I have remapped asp requests to aspnet_isapi.dll - I'm sure I've done this bit right Now in my test app I am getting this error: Server Error in '/TestASPRedirect' Application. -------------------------------------------------------------------------------- This type of page is not served. Description: The type of page you have requested is not served because it has been

Wildcard Action Mapping no longer working after updating to Struts 2.5

∥☆過路亽.° 提交于 2019-12-20 23:32:10
问题 I have the following action mapping in my application's struts.xml , which was working just fine with Struts 2.3.28.1; calls to the /editApplication action where being handled by the x.ApplicationHandler.edit method. <action name="*Application" class="x.ApplicationHandler" method="{1}"> <result name="input">/WEB-INF/application.jsp</result> <result name="success" type="redirectAction"> <param name="actionName">browseApps</param> </result> </action> After upgrading to Struts 2.5, this no

asp.net 4.0 web forms routing - default/wildcard route

二次信任 提交于 2019-12-17 11:01:51
问题 I there a simple way when using ASP.NET 4.0 routing with Web Forms to produce a route that will act as some kind of wildcard? It seems to me that within WebForms, you have to specify a route for every page - I am looking for some kind of generic route that can be used where nothing specific is required, perhaps mapping directly from path to path so... http://somedomain.com/folder1/folder2/page would possibly map to folder1/folder2/page.aspx Any suggestions? Thanks 回答1: You can match all

asp.net 4.0 web forms routing - default/wildcard route

不问归期 提交于 2019-12-17 11:01:48
问题 I there a simple way when using ASP.NET 4.0 routing with Web Forms to produce a route that will act as some kind of wildcard? It seems to me that within WebForms, you have to specify a route for every page - I am looking for some kind of generic route that can be used where nothing specific is required, perhaps mapping directly from path to path so... http://somedomain.com/folder1/folder2/page would possibly map to folder1/folder2/page.aspx Any suggestions? Thanks 回答1: You can match all

Mapping classic asp pages to .net in IIS

吃可爱长大的小学妹 提交于 2019-12-05 09:02:36
I'm trying to map requests for classic asp pages to be handled by .net, so that it runs through a custom httpmodule. In IIS I have remapped asp requests to aspnet_isapi.dll - I'm sure I've done this bit right Now in my test app I am getting this error: Server Error in '/TestASPRedirect' Application. -------------------------------------------------------------------------------- This type of page is not served. Description: The type of page you have requested is not served because it has been explicitly forbidden. The extension '.asp' may be incorrect. Please review the URL below and make sure

Wildcard Action Mapping no longer working after updating to Struts 2.5

时光毁灭记忆、已成空白 提交于 2019-12-03 07:20:23
I have the following action mapping in my application's struts.xml , which was working just fine with Struts 2.3.28.1; calls to the /editApplication action where being handled by the x.ApplicationHandler.edit method. <action name="*Application" class="x.ApplicationHandler" method="{1}"> <result name="input">/WEB-INF/application.jsp</result> <result name="success" type="redirectAction"> <param name="actionName">browseApps</param> </result> </action> After upgrading to Struts 2.5, this no longer works. Attempting to call the /editApplication action shows the 404 error: HTTP Status 404 - There is

Wrong URL match in action

允我心安 提交于 2019-12-01 11:41:52
问题 <action name="/partner/*/*" class="webStoreAction"> <param name="saveUrl">true</param> <param name="homeName">HomePartner</param> <param name="partner">{1}</param> <param name="partnerId">{2}</param> <param name="homeFromMenu">false</param> <result name="success" type="jsf"> /WEB-INF/pages/load.xhtml </result> </action> Why localhost:8080/partner/partnerName matches with this action? 回答1: Try <constant name="struts.patternMatcher" value="regex"/> the only viable matcher for the constants