struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject RE: Forwards in strugs-config.xml
Date Fri, 02 Aug 2002 15:48:40 GMT

Is the gforward="" valid?  I always thought that you called global 
forwards from you actions and you did not specify them in your action 
config part thingee...

-----Original Message-----
From: AKulp []
Sent: Friday, August 02, 2002 11:32 AM
To: struts-user
Subject: Forwards in strugs-config.xml

I'm afraid I can see the answer, but wanted to be sure.  In the
strugs-config.xml you can specify global-fowards.  This seems like a 
way to set a logical name for the view resources.  Unfortunately it is
rather redundant to define "logon" as "/logon.jsp" in global-forwards, 
to redefine it as "success" in a mapping for /logoff later on.  It would 
nice to be able to make action forwards be relative to an 
global forward.  I hope this is making sense!

For example (hypothetical):

            <forward name="logon" path="/logon.jsp"/>
            <forward name="home" path="/index.jsp"/>

            <forward name="success" gforward="logon"/>

In this case, specifying a gforward of "success" in the Action Servlet,
would resolve to the global-forward defined for "logon" which would be
"/logon.jsp."  Otherwise later when I put my JSP's into my WEB-INF 
folder, I
need to remember to change it in the global-forward and all action 
that use them.  Is this already possible in some creative (or directly
supported) way?  Is this just not a good idea for some reason I'm not
thinking of?  Any comments appreciated (well friendly ones anyway...  
;-) )!


Arian Kulp
Java Developer
AEGON Financial Partners

To unsubscribe, e-mail:   
For additional commands, e-mail: 

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message