struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wbchm...@Ensign-BickfordInd.com
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 [mailto:AKulp@Aegonusa.com]
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 
great
way to set a logical name for the view resources.  Unfortunately it is
rather redundant to define "logon" as "/logon.jsp" in global-forwards, 
just
to redefine it as "success" in a mapping for /logoff later on.  It would 
be
nice to be able to make action forwards be relative to an 
already-defined
global forward.  I hope this is making sense!

For example (hypothetical):

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

    <action
            path="/logoff"
            type="com.carefinder.action.LogoffAction">
            <forward name="success" gforward="logon"/>
    </action>

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 
forwards
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...  
;-) )!

Thanks!
-Arian

Arian Kulp
Java Developer
AEGON Financial Partners
akulp@aegonusa.com
319.298.4117




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



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


Mime
View raw message