| Author |
normal class and java Bean
|
Yeshwantrao Patil
Greenhorn
Joined: Dec 05, 2004
Posts: 9
|
|
Hi frendz, what is difference between normal class and java bean ? in jsp UseBean tag we can use only bean or both normal class and javabean ?..if we use both then whatz difference? Thanx in advance yeshwant
|
 |
David Ulicny
Ranch Hand
Joined: Aug 04, 2004
Posts: 724
|
|
|
Basic difference is in constructor, bean must have public non parametric constructor, otherwise you will not be able to use jsp:useBean.
|
SCJP<br />SCWCD <br />ICSD(286)<br />MCP 70-216
|
 |
Yeshwantrao Patil
Greenhorn
Joined: Dec 05, 2004
Posts: 9
|
|
|
Thanx David Ulicny
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56168
|
|
|
Moved to Java in General (beginner).
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Layne Lund
Ranch Hand
Joined: Dec 06, 2001
Posts: 3061
|
|
The other difference is with method names and conventions. Typically a Java Bean has properties. These properties are defined with getter and setter methods. For example, if you want to have a String property named foobar, then you need methods getFoobar() and setFoobar(String). The setter is optional if you want a read-only property. Java Beans also allow for events and more complex property interactions. If you want more details, follow the link in my sig to the Java Tutorial and look for the trail about Java Beans. Layne
|
Java API Documentation
The Java Tutorial
|
 |
 |
|
|
subject: normal class and java Bean
|
|
|