struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "alec lee" <>
Subject forwardPattern and Modules
Date Sun, 13 Nov 2005 17:06:29 GMT
I am using Struts 1.2.4.

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 
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" 
	        contextRelative="false" />
<!-- com.lyl.SuccessAction always return "success" ActionFoward-->
In browser, I requested .../myApp/ and I expect to be forwarded
to .../myApp/moduleA/  But, what I got is that Struts try to
lookup ".../myApp/WEB-INF/moduleA/".  That is, the "/WEB-INF" I 
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 
the documentation, 'forwardPattern' should only related to how the path=
attribute of <forward> tag is interpreted.  There should not be any 
between it and how SwitchAction calculate the URL.

Express yourself instantly with MSN Messenger! Download today it's FREE!

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message