Hi I think storing these kind of date in a session is not great idea... I really like Refirect after post patterny by Jouravlev where author promotes saving submitted data in temporary storage (for example session) and then use redirect to output action adding some kind of identifier to data preivously saved in temporary storage. That's why i think it is much better to pass some kind od identifier as http param to redirect URL. Obviously if you need to set a lot of param to redirect URL, it is quite cumbersome and doesn't look proffesional - you see long, ugly URL in your address bar and maybe session in this case in more appropriate.
2006/7/20, [EMAIL PROTECTED] <[EMAIL PROTECTED]
: 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]