You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2005/11/08 13:18:56 UTC

DO NOT REPLY [Bug 37399] New: - SwitchAction's URL Affected by

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=37399>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37399

           Summary: SwitchAction's URL Affected by <controller
                    forwardPattern>
           Product: Struts
           Version: 1.2.7
          Platform: All
        OS/Version: other
            Status: NEW
          Severity: major
          Priority: P2
         Component: Controller
        AssignedTo: dev@struts.apache.org
        ReportedBy: msqwejst@yahoo.com


I have 2 modules and was trying to switch from default to moduleA.  In my 
moduleA, I've used <controller forwardPattern="/WEB-INF$M$P" />, since my JSP's 
are inside WEB-INF.  In my default module, I have these lines:
...
<action path="/switch" type="org.apache.struts.actions.SwitchAction"/>
<action path="/sf" type="com.lyl.SuccessAction">
 <forward name="success" path="/switch.do?prefix=/moduleA&amp;page=/synForm.do" 
	        contextRelative="false" /> 
</action>
<!-- com.lyl.SuccessAction always return "success" ActionFoward-->
..
In browser, I requested .../myApp/sf.do and I expect to be forwarded 
to .../myApp/moduleA/synForm.do.  But, what I got is that Struts try to 
lookup ".../myApp/WEB-INF/moduleA/synForm.do".  That is, the "/WEB-INF" I put 
into the moduleA's <controller forwardPattern=..> got included into the uri 
calculated by SwitchAction.

I am new to Struts and not sure if this is proper behaviour.  But according to 
the documentation, 'forwardPattern' should only related to how the path= 
attribute of <forward> tag is interpreted.  There should not be any connection 
between it and how SwitchAction calculate the URL.

This behaviour is observed in both Struts 1.2.4 and 1.2.7.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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