| Author |
custom tag and beans
|
veeramani velayutham
Greenhorn
Joined: Dec 10, 2004
Posts: 11
|
|
what is the difference in using customs tag and beans. which one is the best to use. can anyone give explanation. regards veeramani.v
|
 |
Paul Bourdeaux
Ranch Hand
Joined: May 24, 2004
Posts: 783
|
|
Custom Tags are more advanced and flexible than standard jsp tags, such as <jsp:useBean ../> Custom tag libraries make it possible to create business logic that is almost completely hidden from the presentation layer. Beans, however, can also make for a cleaner, less cluttered JSP page. For example, a bean's properties can be automatically set by parameter values from a client request. Beans also have scope, which means they can be used per request, between pages, per session, or even throughout an entire application. As far as which is better... well that depends on what you would like to do. Both beans and custom tags have their place in jsp.
|
“Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.” - Rich Cook
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56521
|
|
Both beans and custom tags have their place in jsp.
Indeed. In fact, the question doesn't make much sense to me. It's like asking "what's better in a Java class, variables or statements?" Beans are used to hold information for a JSP page, usually as scoped variables. Custom tags, and standard tags such as the JSTL, are used to operate upon this data. It isn't an either-or situation.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
 |
|
|
subject: custom tag and beans
|
|
|