On Mon, 19 Jun 2000, Shiraz Wasim Zaidi wrote:

> The action's servlet can then handle the request, and return a HTTP response
> to the controller, which the controller can pass back to the client.
> 
> ---<COMMENT>
> I think you have a wrong understanding that action classes are servlets. No
> they are regular java class that implements Action interface and provide
> perform method definition that is the actions business logic.  Moreover
> Action Classes never return response to the controller servlet i.e.
> ActionServlet. They always return ActionForward, which might be null.

 Just so we're all on the same page here, according to the 
(0.5) documentation, an Action class is not a servlet but it has a simliar
lifecycle to a servlet in that only one Action object is instantiated. So, 
you must consider multi-threading issues when coding your Action class
(like you would with a servlet). Someone please correct me if this is not
the case.


> JavaBeans can also be used to manage input forms. A key problem in designing
> Web applications is retaining and validating what a user has entered between
> requests. With Struts, you can store the data for a input form in a form
> bean, which is automatically maintained through the user's Struts session.
> ---<COMMENT>
> Not necessarily. FormBean would be maintained through user's session if the
> formbean has a scope of session.
> ---</COMMENT>

 And, looking at the processActionForm() method in the ActionServlet
class, session is the default scope for ActionForm beans.


Reply via email to