Thank you the detailed reply.

Can we populate ActionForm to populate result set data..How? and then
how one can retrieve it in JSP page ..in html table.

If anybody has already done it ..I will appreciate if they can send me
sample code...else even hint/refrences will do

Pradeep Kumar

Digital Globalsoft Ltd.
(A subsidiary of Hewlett-Packard)


-----Original Message-----
From: Khalid K. [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 26, 2004 3:38 AM
To: Struts Users Mailing List
Subject: Re: data transfer from Action class to jsp page

Just to expand on what Max said,

1. create a ActionForm
  i.e. class MyForm extends ActionForm
2. define attributes that you want to show on the jsp
   i.e. name, street, city, zip
3. you can optionally define validate() and reset() methods

4. define your form bean in struts-config.xml

5. associate the form bean with your action in struts-config.xml

6. in your action read data from database populate form

7. in jsp access form attributes to display values and if needed
   let client change it.

Khalid

Quoting Max Cooper <[EMAIL PROTECTED]>:

> Put it in the ActionForm.
> 
> -Max
> 
> ----- Original Message ----- 
> From: "Pradeep, PK" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Wednesday, February 25, 2004 6:51 AM
> Subject: data transfer from Action class to jsp page
> 
> 
> 
> I have this basic question.....
> 
> Suppose action class calls some business object and fetches some data
> (say employee detail). How to transfer this data to jsp page which is
> reached through ActionForward?
> 
> One way I know is storing the data in session object..is there any
> better/different way
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
Khalid K.

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


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

Reply via email to