struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Jasnowski" <mjasn...@bea.com>
Subject RE: DO NOT REPLY [Bug 22037] New: - Passing query string parameters to an ActionForward
Date Fri, 01 Aug 2003 13:39:14 GMT
I'm not sure if this would satisfy you're request, but you can extend the
<forward> element to include custom properties, this extension is then named
in the "className" attribute. You can then locate your forward as usual,
then cast it down to your extension class, and call a setter on it.

-----Original Message-----
From: bugzilla@apache.org [mailto:bugzilla@apache.org]
Sent: Thursday, July 31, 2003 7:12 PM
To: struts-dev@jakarta.apache.org
Subject: DO NOT REPLY [Bug 22037] New: - Passing query string parameters
to an ActionForward


DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22037>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22037

Passing query string parameters to an ActionForward

           Summary: Passing query string parameters to an ActionForward
           Product: Struts
           Version: 1.1 Final
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Standard Actions
        AssignedTo: struts-dev@jakarta.apache.org
        ReportedBy: paustin@galdosinc.com


In our application we wish to pass a parameter to the page that we redirect
to
using a forward in the configuration file. For example we have an e-commerce
application that has a order summary page that needs the orderId parameter.
When you add an item to the order we redirect back to the order summary page
with that id.

At the moment there is no standard way to do this, the approach we have
taken
with the existing solution is to create a new ActionForward based on the
action
forward loaded from the configuration file. We then manually set the path of
the new forward using the old path and the query string parameters (i.e.
forward.getPath() + "?orderId=" + orderId. This works but isn't very clean.

A cleaner way would be to provide functionality to specify parameters for an
action forward. There are two options I see.

1. Have a setParameter(name:String,value:String) on the ActionForward class
that you can set in the action.
2. Allow Expression language variables in the path in the forward config
(i.e. /order.do?orderId=${orderId}) and for efficiency have a flag
idnicating
if EL substitution should be performed or not. Then when the action forward
is
processed the stuts code substitutes vairables from the request, sesssion
just
as in a JSP.

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



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


Mime
View raw message