Two Laptop Bag*
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
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 ]
 
wood burning stoves
 
subject: Actions (struts) dynamic path forwarding
 
Similar Threads
Sort array - by two fields
get Element value using another element
Question regarding Struts Validator
Get data for child using jdom
poulate a form from the reset (good practice)?