struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lukasz Lenart <lukaszlen...@apache.org>
Subject Re: Struts2 namespace confusion
Date Fri, 28 Apr 2017 08:33:20 GMT
2017-04-27 13:56 GMT+02:00 Ralph Grove <ralph.grove@gmail.com>:
> Matt, did this solve your problem? I'm having the same issue with namespaces. With this
example, I can request ".../Home", ".../Home/Alpha", ".../Alpha/Alpha/Alpha", etc.    The
action executes in each case, but if the URL contains more than one slash, the relative path
is messed up for files included in the JSP.
>
> Ralph Grove
>
> <!DOCTYPE struts PUBLIC
>     "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
>     "http://struts.apache.org/dtds/struts-2.0.dtd">
> <struts>
>
>     <constant name="struts.mapper.alwaysSelectFullNamespace" value="true" />
>     <constant name="struts.enable.SlashesInActionNames" value="false" />
>
>     <package name="main" extends="struts-default">
>         <default-action-ref name="NotFound"/>
>
>         <global-results>
>             <result name="error">/error.jsp</result>
>         </global-results>
>
>         <global-exception-mappings>
>             <exception-mapping exception="java.lang.Exception" result="error"/>
>         </global-exception-mappings>
>
>         <action name="NotFound">
>             <result>/error.jsp</result>
>         </action>
>
>         <!-- Sidebar menu item and static link actions -->
>         <action name="Home" class="com.opensymphony.xwork2.ActionSupport">
>             <result>/WEB-INF/jsp/index.jsp</result>
>         </action>
>         <action name="Alpha" class="com.opensymphony.xwork2.ActionSupport">
>             <result>/WEB-INF/jsp/alpha.jsp</result>
>         </action>
>         <action name="Beta" class="com.opensymphony.xwork2.ActionSupport">
>             <result>/WEB-INF/jsp/beta.jsp</result>
>         </action>
>
>
>         <!-- Actions -->
>         <action name="AnAction" class="action.AnAction">
>             <result name="success">/WEB-INF/jsp/index.jsp</result>
>             <result name="input">/WEB-INF/jsp/beta.jsp</result>
>         </action>
>
>     </package>
> </struts>

I assume you don't use the Convention plugin also what version do you use?


Regards
-- 
Ɓukasz
+ 48 606 323 122 http://www.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message