Jeff,

Partially, this is my fault... I should have stated this to begin with. Yes,
I am very aware of the problems with doing this and that this has to be kept
in session scope in order for this to work.

My only question was if there is a way to specify this in the
struts-config.xml, using validator framework or anything else, BESIDES,
customizing the processor.

Does anyone know of ANY way, besides customizing the controller, to specify
in some config file so that it redirects, not forwards to the input?

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