> 1. If we use ActionForm, the ActionServlet first executes the 
> validate()
> method before calling execute() on the corresponding Action. 
> If I switch
> from ActionForms to Struts Validator (that is, use 
> ValidatorForm instead
> of ActionForm), do things work the same way? Is it that in this case
> also, ActionServlet calls the validate() just before calling the
> execute()?

>From my small experience, yes.
The validate() will either return null, and the Action execute().
Or the validate() returns a bunch or ActionErrors, and the ActionServlet
will then point to the URL of the "input" field of the current
ActionMapping.

 
> 2. What is the standard way to pass data from Action objects 
> to the JSP
> (view)? Should the data be sent as a) Session properties, b) Some bean
> objects, or c) Data members of the Action object?

Beans stored in request scope sounds good.
Personnally, I use A LOT of session properties.

The "problem" of request scope is that it is reset at each request.

Do take care about your ActionForm. They are reset() each time
the ActionServlet access them. A lot of time is lost before you
realize it. Most of the time, you will need to create subclasses of
the ActionForm that have empty reset(), so your forms survives some
time.

I would greatly appreciate the gurus to confirm all what I said :-)

This e-mail is intended only for the above addressee. It may contain
privileged information. If you are not the addressee you must not copy,
distribute, disclose or use any of the information in it. If you have
received it in error please delete it and immediately notify the sender.
Security Notice: all e-mail, sent to or from this address, may be
accessed by someone other than the recipient, for system management and
security reasons. This access is controlled under Regulation of
Investigatory Powers Act 2000, Lawful Business Practises.

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

Reply via email to