Felix Khazin asked;
> Hi all,
> 
> I have a quick question:
> 
> My struts-config.xml has a forward line such as:
> <forward name="show" path="/application.do"/>
> In my controller if I set an attribute such as:
> 
> Request.setAttribute("test", "test string");
> Return (mapping.findForward("show"));
> 
> This works fine and I am able to use test in the view.
> 
> But if I change the forward to "redirect=true" this 
> functionality disappears and I am no longer able to use the 
> attributes set in the controller.
> 
> Does anyone know why I can't do this with a redirect, and how 
> I may be able to still use a redirect and get the attributes 
> in the view?

A redirect is a message to the browser telling it to make a new request
for a different URL.  Since the browser is sending a new request, any
data you put into the old request goes away.  If you need to have data
available between browser requests, store it in the session, instead.

 - George
   http://www.idiacomputing.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to