struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Husted <hus...@apache.org>
Subject Re: Simplifying struts-config.xml
Date Thu, 08 Jul 2004 22:01:50 GMT
One thing people do is setup the unknown action 

<action
 type='com.crackwillow.struts.action.ForwardToForwardAction'
unknown=true />

The ForwardToForwardToAction would example the request to see what path was requested and
extract it for use with your ForwardAction. 

The new wildcard support would also work, but only if all the root paths worked this way.

> <action
> path='/*'
> type='com.crackwillow.struts.action.ForwardAction'
> parameter='{1}'/>

The patch I'd really like to see is adding support for "extends" to all the Struts elements,
like we have for Tiles.

We should also support a properties file, so you could use ${properties} in the XML elements.

-Ted.


On Thu, 08 Jul 2004 14:44:59 -0700, Michael McGrady wrote:
> Is there a way to do the following using less real-estate in struts-
> config.xml?  If not, there should be:
>
>
> <action
> path='/admin_help'
> type='com.crackwillow.struts.action.ForwardAction'
> parameter='admin_help'/>
>
> <action
> path='/language_help'
> type='com.crackwillow.struts.action.ForwardAction'
> parameter='language_help'/>
>
> <action
> path='/main_help'
> type='com.crackwillow.struts.action.ForwardAction'
> parameter='main_help'/>
>
> <action
> path='/admin_webmaster_help'
> type='com.crackwillow.struts.action.ForwardAction'
> parameter='admin_webmaster_help'/>
>
> <action
> path='/admin_host_help'
> type='com.crackwillow.struts.action.ForwardAction'
> parameter='admin_host_help'/>
>
> <action
> path='/logon_webmaster_help'
> type='com.crackwillow.struts.action.ForwardAction'
> parameter='logon_webmaster_help'/>
>
> <action
> path='/logon_host_help'
> type='com.crackwillow.struts.action.ForwardAction'
> parameter='logon_host_help'/>
>
> <action
> path='/logon_guest_help'
> type='com.crackwillow.struts.action.ForwardAction'
> parameter='logon_guest_help'/>
>
>
> <action
> path='/register_help'
> type='com.crackwillow.struts.action.ForwardAction'
> parameter='register_help'/>
>
> <action
> path='/remind_me_help'
> type='com.crackwillow.struts.action.ForwardAction'
> parameter='remind_me_help'/>
>
>
> --------------------------------------------------------------------
> - To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For
> additional commands, e-mail: user-help@struts.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message