Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes JSP and the fly likes custom tag and beans Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "custom tag and beans" Watch "custom tag and beans" New topic
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: 63216
    
  69

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: custom tag and beans
 
It's not a secret anymore!