On Mon, 22 Jul 2002, Agrawal, Rajeev wrote:

> Date: Mon, 22 Jul 2002 11:16:36 -0400
> From: "Agrawal, Rajeev" <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: "'[EMAIL PROTECTED]'" <[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?
> >

Typically, an Action will pass information via request attributes (or
sometimes session attributes), which can then be accessed by the view
layer.  It's also very common for an action to prepopulate a form bean
that will be used in a subsequent view -- for an example of this, take a
glance at the code for the Struts example webapp, when you click the "Edit
your user registration profile" link.

> > Cheers
> >
> > Rajeev Agrawal
> > Tel: 212-429-3216
> >
>

Craig


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

Reply via email to