You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by alec lee <al...@hotmail.com> on 2005/11/13 19:47:07 UTC

forwardPattern and Action Relaying

I am using modules and placing my JSPs under /WEB-INF.  My understanding is 
that struts support this configuration by using <controller 
forwardPattern="/WEB-INF$M$P" > in my struts-config-module.xml to map 
forward path to the proper module relative URL.

However, what if now I want to relay from one action to another using the 
forward path e.g.

<action path="/actionA"...
  <forward name='...' path="/actionB.do"/>
</action>

<action path="/actionB"...>
..
</action>

The 'path=/actionB' will be replaced by the '/WEB-INF/module/actionB.do' 
string due to the forwardPattern string.  If I use contextRelative="true" 
e.g.

  <forward name='...' path="/actionB.do" contextRelative="true"/>

The path will be relative to the application rather than the current module. 
  What I really need is a way to specify /module/actionB.do.  Can it be 
done?  Or, what should be the best practice when using modules with JSP 
placed under WEB-INF?

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


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


Re: forwardPattern and Action Relaying

Posted by alec lee <al...@hotmail.com>.
Paul Benedict <paul4christ79 <at> yahoo.com> writes:

> 
> >> /myApp/WEB-INF/module/actionB.do!
> 
> I never ever seen Struts resolve to WEB-INF. That's a file system path. 
Struts paths are URI which
> are not in the file system.
> 
> 		
That is because of the <controller forwardPattern="/WEB-INF$M$P"> I used which 
prepend "/WEB-INF" to every path attribute of <forward>.


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


Re: forwardPattern and Action Relaying

Posted by Paul Benedict <pa...@yahoo.com>.
>> /myApp/WEB-INF/module/actionB.do!

I never ever seen Struts resolve to WEB-INF. That's a file system path. Struts paths are URI which
are not in the file system.



		
__________________________________ 
Start your day with Yahoo! - Make it your home page! 
http://www.yahoo.com/r/hs

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


Re: forwardPattern and Action Relaying

Posted by alec lee <al...@hotmail.com>.
Paul Benedict <paul4christ79 <at> yahoo.com> writes:

> 
> There is a module attribute to the forward tag. From the DTD: "The module 
prefix to use with this
> path. This value should begin with a slash ("/")."
> 


Thx but after using <forward module="module"...> the URL resolves to
"/myApp/WEB-INF/module/actionB.do"! What I need is a url that is refering to 
<action path="/actionB.do"...> which should be a module relative path and hence 
I need somehow to get "/module/actionB.do" from my <forward> tag while getting 
rid of the effect of forwardPattern'




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


Re: forwardPattern and Action Relaying

Posted by Paul Benedict <pa...@yahoo.com>.
There is a module attribute to the forward tag. From the DTD: "The module prefix to use with this
path. This value should begin with a slash ("/")."


--- alec lee <al...@hotmail.com> wrote:

> I am using modules and placing my JSPs under /WEB-INF.  My understanding is 
> that struts support this configuration by using <controller 
> forwardPattern="/WEB-INF$M$P" > in my struts-config-module.xml to map 
> forward path to the proper module relative URL.
> 
> However, what if now I want to relay from one action to another using the 
> forward path e.g.
> 
> <action path="/actionA"...
>   <forward name='...' path="/actionB.do"/>
> </action>
> 
> <action path="/actionB"...>
> ..
> </action>
> 
> The 'path=/actionB' will be replaced by the '/WEB-INF/module/actionB.do' 
> string due to the forwardPattern string.  If I use contextRelative="true" 
> e.g.
> 
>   <forward name='...' path="/actionB.do" contextRelative="true"/>
> 
> The path will be relative to the application rather than the current module. 
>   What I really need is a way to specify /module/actionB.do.  Can it be 
> done?  Or, what should be the best practice when using modules with JSP 
> placed under WEB-INF?
> 
> _________________________________________________________________
> Express yourself instantly with MSN Messenger! Download today it's FREE! 
> http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 



		
__________________________________ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com

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