struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Naskovski <mnask...@san.rr.com>
Subject Re: Passing request from Action to another action
Date Fri, 18 Jul 2003 07:28:08 GMT
There's 2 common ways to pass data between subsequent HTTP requests - through the
request scope and the session scope. If you use the request scope,
then make sure none of your global/local forwards in your
struts-config.xml are set to redirect="true".  On the other hand, if
you dont mind "poluting" your session scope, then you can use the
session to pass off whatever you like between requests.

The issue w/using session scope is that you have to worry about
cleaning it up. And that implies some sort of workflow.  IMHO, about
the only thing STruts 1.1 is missing is some nice workflow mechanism.
Maybe they could take the one from Struts Workflow Extension and adapt
it :). I think it was some german group that developed it.

Martin

Thursday, July 17, 2003, 11:12:07 PM, you wrote:

rxyvc> Hi,
rxyvc> In perform() of Action1, I put a Object in setAttribute and  submit to a
rxyvc> xxx.do which forward my page to 2nd jsp. In the perform() of Action2 (this
rxyvc> gets called when i submit xxx.do), I try to get the atribute... but it's
rxyvc> giving me null.
rxyvc> What could be wrong ?
rxyvc> Is request the best way to pass objects between Servlets or session ?

rxyvc> thanks
rxyvc> -raj




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



-- 


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


Mime
View raw message