This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
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 Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "ActionMapping Watch "ActionMapping New topic

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

Dave Knipp
Ranch Hand

Joined: Oct 14, 2003
Posts: 146
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/"/>

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/" />
If anyone could help that would be great,

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

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

Srikanth Shenoy
Author of Struts Survival Guide : Basics to Best Practices
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: ActionMapping's local forwards : can 'path' map to other action uris?
jQuery in Action, 3rd edition