Title: RE: Scope of the form

Roland,

Thank you for the answer.

In the forsard.setRedirect(true), can I also forward the content of the request?

When I was talking about the erroe, I was actually refering to "the validation error in the form".  In that the case the ActionController will forward to the "input" of the action class, with request or without?

According to Roland, the
-----Original Message-----
From: Roland Huss [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 07, 2001 10:24 AM
To: [EMAIL PROTECTED]
Subject: Re: Scope of the form



> 1. Whenever the Action do a forward, the request is being forwarded.

It depends, whether you do an redirect (forward.setRedirect(true)) or
a true forward, which simply includes another resources in the
response. In the former case, the redirected resources receives a new
Request since this is essentially initiated from the client. In the
later case, you are right, the response is forwarded to resource to be
included (which is the normal case with Struts forwards).

> 2. When the error happens, the request is forwarded back to the same JSP

What kind of error do you mean ? If an exception is thrown in your
Action it is passed up to the Servlet-Container, which creates an
appropriate response for the client (configurable in web.xml). If an
exception occurs in the JSP-page, the error-page defined in your
JSP-Page is called (with the very same request).

> 3. If I define the scope of the form related to the Action class as
> "request", then before the JSP page is rendered, the form is still in the
> request, but after the JSP page is rendered,the form is taken out from the
> request?

That's true, since after the JSP has been rendered the Response is
sent back to the client and the lifecycle of the request has
finished.

cu....
--
                                                        ...roland huss
                                                             consol.de

Reply via email to