File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes ActionMapping's local forwards : can 'path' map to other action uris? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "ActionMapping Watch "ActionMapping New topic
Author

ActionMapping's local forwards : can 'path' map to other action uris?

Dave Knipp
Ranch Hand

Joined: Oct 14, 2003
Posts: 146
Hi,
I'm curious whether or not an action mapping's local forward can have a logical path, instead of a physical path. ie. do i have to specify an actual .jsp or .html file in the path like this:
<forward name="success" path="/ftd_jsp/campaign.jsp" />
or can i specify another forward as the path:
local forward within action mapping:
<forward name="success" path="campaign" />
global forward in struts-config.xml:
<<forward name="campaign" path="/do/Campaign.do"/>

If i can't do that then i should be able to specify the actual path to the action in the local forward's path, like this:
<forward name="success" path="/do/Campaign.do" />
If anyone could help that would be great,
Thanks,
Dave


SCJP 1.4, SCJD 1.4, SCWCD 1.3, SCBCD 1.3, IBM Certified Solution Developer -WebSphere Studio V5.0
Srikanth Shenoy
author
Ranch Hand

Joined: Jan 24, 2004
Posts: 184
Hi Dave,
You can certainly do this:
<forward name="success" path="/do/Campaign.do" />
This is called Action Chaining.


Srikanth Shenoy
Author of Struts Survival Guide : Basics to Best Practices
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ActionMapping's local forwards : can 'path' map to other action uris?