• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Actions (struts) dynamic path forwarding

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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...
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving to the Struts forum. (They just CALL it the Frameworks forum ).
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You have to build it in the action handler. Try this:

[ April 30, 2003: Message edited by: Jon McLennan ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic