In general, the page (view) should access data placed in either the application, request, page, or session scope by the Action class. It is considered a "best practice" for the Action class to act as a proxy to your business tier. For example, the Action class would leverage the appropriate business beans to process the data. The Action class would be responsible for placing the results of the processing (if any) in the appropriate scope.
The servlet, in the data transport diagram below, represents the front controller or Struts ActionServlet, and therefore it is not directly responsible for placing the data in the respective scope, but rather delegates HTTP requests to the appropriate Action class and forwards to the appropriate view. robert > -----Original Message----- > From: Agrawal, Rajeev [mailto:[EMAIL PROTECTED]] > Sent: Monday, July 22, 2002 11:17 AM > To: '[EMAIL PROTECTED]' > Subject: Populating view from Web tier? > > > I have been reading some documentation on Struts. One thing I am not clear > about is how is the data sent back from Servlet to the view? > > > In descriptive form the question is: > > > > View -> Servlet -> ActionForm -> Action -> ActionForward -> JSP / HTML > > > > The question is how do we send the data between ActionForward and JSP. I > > believe it will be ActionForm if the validation fails. If the validation > > doesn't fail then it has to be a class derived from ActionForm > so that it > > is transparent to the view. Is that so? Where do we specify > which class is > > used for sending the data to the view? Is that part of the Action code? > > > > Cheers > > > > Rajeev Agrawal > > Tel: 212-429-3216 > > > > > If you have received this e-mail in error or wish to read our > e-mail disclaimer statement and monitoring policy, please refer > to http://www.drkw.com/disc/email/ or contact the sender. > > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

