struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 22037] New: - Passing query string parameters to an ActionForward
Date Thu, 31 Jul 2003 23:11:56 GMT
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


Mime
View raw message