Hi,

Using request scope instead of session makes sense.

One question on your suggestion. Usually the form bean represents the
form data of the "previous" page. The data, which is required to be put
in the view (JSP), most probably would not be present in the form bean.
So, how can we say that using the form bean is the best idea. In the
scenario which I described, what can be the alternative and best
practise?

Thanks,
Suresh

>-----Original Message-----
>From: [EMAIL PROTECTED] 
>[mailto:[EMAIL PROTECTED]] 
>Sent: Wednesday, December 18, 2002 4:37 PM
>To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
>Subject: RE: Validator (newbie)
>
>
>U r first Q ,I dont know ...But abt 2nd may be i have some 
>suggestion form my 
>experience with struts ..
>>>>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?
>
>GEnerally u should try to avoid using session variables.So the 
>standard way is 
>to pass the data in request scope.So if the data u want to use 
>in jsp is 
>attribute of the formBean,then as the form bean is available 
>to the jsp , u can 
>use it there...I think this keeps the design clean as the form 
>bean actually 
>represents the form data..So u dont have to look at the action 
>class to see 
>what u are trying to put on jsp..The form bean is the place... 
>
>-----Original Message-----
>From: suresh.addagalla [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, December 18, 2002 12:02 PM
>To: struts-user
>Subject: Validator (newbie)
>
>
>Hi,
>
>I have a couple of basic questions.
>
>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()?
>
>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?
>
>Thanks,
>Suresh
>
>

**************************Disclaimer************************************************** 
   
 
 Information contained in this E-MAIL being proprietary to Wipro Limited is 
'privileged' 
and 'confidential' and intended for use only by the individual or entity to which it 
is 
addressed. You are notified that any use, copying or dissemination of the information 
contained in the E-MAIL in any manner whatsoever is strictly prohibited.

****************************************************************************************




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

Reply via email to