So, let me reiterate: if we are using session scope, is it possible to tell
Struts to redirect to the input and not forward.

(Let's skip the "it's not a good idea discussion. Whatever it is, I just
want to know if it's possible or not.)

Thanks,
Yaakov.

-----Original Message-----
From: news [mailto:[EMAIL PROTECTED] Behalf Of Jeff Beal
Sent: Monday, February 07, 2005 2:55 PM
To: user@struts.apache.org
Subject: Re: Redirecting back to input

Chaikin, Yaakov Y. wrote:

> Is there a way to tell Struts to actually redirect to the "input" instead
of
> forward to it? Basically, what I am trying to achieve here is this. When
the
> user first comes to the form, it's a regular JSP looking URL, i.e.,
directly
> accessible to the user through .../blah.jsp... If the form doesn't
validate,
> Struts forwards the user to the same exact page with some error messages
on
> it, but the URL now reads something like .../action.do...

The problem with this is that redirecting creates a new request, thereby
destroying any ActionForms in the request scope.  Since storing all of
your ActionForms in session scope could use significant memory
resources, I don't believe there's a trivial solution to the problem
that works exactly the way that you want it too.

You may be able to come up with something clever in a custom
RequestProcessor.  One possibility would be to override the
processValidate() method such that it would create a writable copy of
the input forward and append the request parameters to the request path
prior to sending the redirect to the client.

-- Jeff


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

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

Reply via email to