struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laszlo Borsos <bl2...@freemail.hu>
Subject Re: RE Sending value stack from Action A to Action B
Date Wed, 22 Aug 2007 15:39:30 GMT
I haven't tried it yet, but the Chaining Interceptor is also meant for
this purpose.


MLENEVEUT@abusinessware.com wrote:
>> 1) How can values in the value stack be sent among actions, so that they 
> are
>> available in the final web page?
> 
> Put your values in HttpSession
> 
> 
> 
> 
> 
> wild_oscar <miguel@almeida.at> 
> 22/08/2007 16:48
> Veuillez répondre à
> "Struts Users Mailing List" <user@struts.apache.org>
> 
> 
> A
> user@struts.apache.org
> cc
> 
> Objet
> Sending value stack from Action A to Action B
> 
> 
> 
> 
> 
> 
> 
> Being new to Struts2, I was searching for an answer to a use case I
> developed:
> 
> - Welcome page has login form (send to LoginAction)
> - LoginAction reads username and password and sends to ListStuffAction
> - ListStuffAction reads stuff from database and sends to Stuff page
> - Stuff page lists the stuff.
> 
> In Suff page, I also have a "welcome *username*, your password is
> *password*"
> 
> Now, in LoginAction the username and password are in the value Stack and I
> can access them. But when I reach the Stuff page, I get an odd "Welcome, < 
> .
> Your password is <".
> 
> I'm guessing the value stack isn't sent among actions. I tried making
> LoginAction's result to be of type ServletActionRedirectResult and
> ActionChainResult, but both failed.
> 
> My questions are:
> 
> 1) How can values in the value stack be sent among actions, so that they 
> are
> available in the final web page?
> 2) Isn't this a common scenario in struts2's web development?
> 
> The reason I was trying this approach is the fact that I want to use the
> ListStuffAction repeatedly: when a user logs in, after a user inserts a 
> new
> record so that the list can be updated with the new value, etc.
> 
> 
> Thank you for your answers!


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


Mime
View raw message