aspose file tools*
The moose likes Struts and the fly likes Action Forms and Beans Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Action Forms and Beans" Watch "Action Forms and Beans" New topic
Author

Action Forms and Beans

Balachandar Nayak
Greenhorn

Joined: Jul 22, 2005
Posts: 29
Dear all,
:roll:
Im learning J2EE and Im a beginner
What is JavaBean?
What is the use of the getter and setter functions
described in the Bean?
How it is used to transfer data from a GUI and a database?
In case of Struts we are using ActionForm What is its use?
Kindly response to my question.

Thanks in Advance

Regards
bala
Rekha
Greenhorn

Joined: Apr 25, 2005
Posts: 7
Javabeans are independent,reusable software modules they extend java's "write once",run any where and "reuse every where" capability.

Each bean has properties,events and methods associated with it.

The set/get methods are used for setting and getting the properties of a Bean.

For a short introduction on Javabeans you can visit

http://java.sun.com/developer/onlineTraining/Beans/JBShortCourse/beans.html#beanIntro

ActionForm:
An ActionForm is a JavaBean that extends org.apache.struts.action.ActionForm. ActionForm maintains the session state for web application and the ActionForm object is automatically populated on the server side with data entered from a form on the client side.

~ Rekha.
Aro Rajesh
Greenhorn

Joined: Sep 22, 2005
Posts: 3
Hi,

In Struts, java bean which extends ActionForm acts like a transform object between view (jsp) and action (servlet). so u can directly access the properties defined in jsp. on a return from servlet, it is useful in displaying the values of properties using BEAN or HTML tag of struts.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Action Forms and Beans