You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Søren Poulsen <wm...@hotmail.com> on 2006/12/26 19:52:20 UTC

Page param disappears

I have a form page that requires a http parameter to show correctly.

When the formbean validate(..) fails on page submit then struts has been
set up to send the user back to the same form page.

Unfortunately the http param that was set when the user was first linked to 
the page
is not set when struts redirects the user back to the same page again. How 
do I make struts
set the param to the same value when validate fails? Since execute() is 
never called i
havent got the option to save the parameter in some temporary scope 
attribute.

_________________________________________________________________
Opret en personlig blog og del dine billeder på MSN Spaces:  
http://spaces.msn.dk


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


Re: Page param disappears

Posted by Laurie Harper <la...@holoweb.net>.
Søren Poulsen wrote:
> I have a form page that requires a http parameter to show correctly.
> 
> When the formbean validate(..) fails on page submit then struts has been
> set up to send the user back to the same form page.
> 
> Unfortunately the http param that was set when the user was first linked 
> to the page
> is not set when struts redirects the user back to the same page again. 
> How do I make struts
> set the param to the same value when validate fails? Since execute() is 
> never called i
> havent got the option to save the parameter in some temporary scope 
> attribute.

If you forward rather than redirect back to your input page (which I 
think Struts does by default unless you tell it otherwise) your request 
parameters should still be there. Are you including the request 
parameter the form needs to display as part of the data that the form 
submits?

Post your JSP and relevant portions of your config so we can see exactly 
what you're doing. It's hard to diagnose problems like this without 
knowing how things are set up.

L.


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