aspose file tools*
The moose likes Struts and the fly likes Actions (struts) dynamic path forwarding 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 "Actions (struts) dynamic path forwarding" Watch "Actions (struts) dynamic path forwarding" New topic
Author

Actions (struts) dynamic path forwarding

Jochen Maes
Greenhorn

Joined: Dec 03, 2002
Posts: 20
Hi all,

my mappings are like this:
[code]<action path="/order" type="OrderAction">
<forward name="orders" path="/orders/orders.jsp"/>
<forward name="detail" path="/orders/detail.jsp"/>
<forward name="form" path="/orders/placeorder.jsp"/>
<forward name="emptyform" path="/orders/placeorder.jsp?empty=true"/>
<forward name="place" path="/orders/confirm.jsp?response=ok"/>
<forward name="cancelled" path="/orders/cancelled.jsp"/>[code]
as you see the paths are hard coded...
is there a possibility to add somepthing in front of the path dynamicly? like user1 has /user1/<actionpath> and user2 has /user2/<actionpath> ???
i have absolutely no clue how to acchieve this... please advice...
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
Moving to the Struts forum. (They just CALL it the Frameworks forum ).


"JavaRanch, where the deer and the Certified play" - David O'Meara
ca buki
Greenhorn

Joined: Oct 10, 2002
Posts: 12
You have to build it in the action handler. Try this:

[ April 30, 2003: Message edited by: Jon McLennan ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Actions (struts) dynamic path forwarding