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

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Action Forms and Beans" Watch "Action Forms and Beans" New topic

Action Forms and Beans

Balachandar Nayak

Joined: Jul 22, 2005
Posts: 29
Dear all,
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


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

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

Joined: Sep 22, 2005
Posts: 3

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:
subject: Action Forms and Beans
It's not a secret anymore!