You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Matt Raible <ma...@raibledesigns.com> on 2002/12/27 05:35:34 UTC
Best Practice for Forwarding to a Tile?
I have all my pages stores as definitions in a tiles-config.xml file. I
want to setup global-forwards that will route a user to a definition.
The two ways I've found that work are:
1. Adding a forward that points to a ForwardAction that has the
definition name as a parameter.
2. Use a DefaultAction that maps to an "/unknown" mapping.
The first one requires much more work, as there are two entries for each
link I want to add:
<forward name="editProfile" path="/userProfile.do"/>
...
<action
path="/userProfile"
type="org.apache.struts.actions.ForwardAction"
parameter="userProfile"/>
Is there an easier way? I'd love to use multiple forwards and one
action to handle all of the my definition-forwards.
Thanks,
Matt