You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Bryan Field-Elliot <br...@netmeme.org> on 2001/03/14 16:33:24 UTC

struts-config.xml suggestion

Using 1.0 beta --

I have many "global forwards" in my config. All of my "input forms" are 
represented as global forwards. e.g.:

<global-forwards>
   <forward name="logon" path="/jsp/logon.jsp"/>
</global-forwards>

In my action mappings, those which require ActionForms have an "input" tag:

<action
   ...
   input="/jsp/logon.jsp">
</action>

It would be nice if the "input" attribute of the "action" tag would 
allow me to refer to a global-forward, instead of an absolute filename. 
If it did, then if I were to change the filename of my logon JSP page, I 
would only have to change it in one place.

If I am missing something and I can already do this some other way, then 
please direct me.

Thanks,
Bryan


Re: struts-config.xml suggestion

Posted by Rajan Gupta <rg...@yahoo.com>.
I think the same can be applied to action and its type so that there can
be a possibility of using an action in diffenet mappings e.g.
<actionType name="editReg" 
            type="org.apache.struts.example.EditRegistrationAction"/>

<action   path="/editRegistration"
          actionType="editReg"
          name="registrationForm"
          scope="request"
          validate="false">
      <forward name="success"              path="/registration.jsp"/>
</action>
By doing this, I can reuse editReg for different purposes while having the
ability to change the implementation at one place. References are always
nice :)
--- Bryan Field-Elliot <br...@netmeme.org> wrote:
> Using 1.0 beta --
> 
> I have many "global forwards" in my config. All of my "input forms" are 
> represented as global forwards. e.g.:
> 
> <global-forwards>
>    <forward name="logon" path="/jsp/logon.jsp"/>
> </global-forwards>
> 
> In my action mappings, those which require ActionForms have an "input"
> tag:
> 
> <action
>    ...
>    input="/jsp/logon.jsp">
> </action>
> 
> It would be nice if the "input" attribute of the "action" tag would 
> allow me to refer to a global-forward, instead of an absolute filename. 
> If it did, then if I were to change the filename of my logon JSP page, I
> 
> would only have to change it in one place.
> 
> If I am missing something and I can already do this some other way, then
> 
> please direct me.
> 
> Thanks,
> Bryan
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices.
http://auctions.yahoo.com/