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
posted
0
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
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
posted
0
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.