It's not a secret anymore!
The moose likes JSP and the fly likes javabeans Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "javabeans" Watch "javabeans" New topic


nirail rail
Ranch Hand

Joined: Nov 14, 2003
Posts: 39

is there any software to create javabeans?

Vishnu Prakash
Ranch Hand

Joined: Nov 15, 2004
Posts: 1026
JavaBeans are nothing but java classes with certain standards.

1. you should have public no-args constructor
2. have getter and setter methods
3. after stripping the get and replacing the first character of whats left to lower case is your property name.
4. property names should be derived from methods and not from members of the class.
5. return type of getter and argument of setter should match.

These are some of the rules you should adhere to when you write a java bean.

Servlet Spec 2.4/ Jsp Spec 2.0/ JSTL Spec 1.1 - JSTL Tag Documentation
nirail rail
Ranch Hand

Joined: Nov 14, 2003
Posts: 39
Thanks Vishnu Prakash

i know i was intrested in knowing is there any IDE / Software which will return a javabean class if we pass it with varible names

Ben Souther

Joined: Dec 11, 2004
Posts: 13410

Most IDEs have a wizard for creating Java Objects.
If you follow the guidlines posted by Vishnu in this thread, you should be able to create Javabeans with any of them.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
I agree. Here's the link:
subject: javabeans
It's not a secret anymore!