• Post Reply Bookmark Topic Watch Topic
  • New Topic

why taglib when usebean is there?  RSS feed

 
Vikram Kamate
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
why we need tablib?
How taglib and usebean are different? or What taglib do that usebean cant do?
Vikram.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In general:
1. beans tend to be used for simple functions while taglibs can be quite complex.
2. taglibs are convenient for packaging and distributing a number of related functions as a jar.
3. the taglib base classes have a number of useful functions already well debugged, making it easier to create your own taglibs, as opposed to beans where you start with a blank slate.
Bill
 
Simon Brown
sharp shooter, and author
Ranch Hand
Posts: 1913
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And just to add one more point, tags are much more aware of the environment in which they run, meaning that they have access to things like the session, request, etc.
For a detailed comparison of tags vs. JavaBeans, check out Chapter 8 : Tag Patterns (from Professional JSP Tag Libraries) that is available to download for free in PDF format.
Regards
Simon
 
Vikram Kamate
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot
William and simon,
you people are doing great job.
thanks again
Vikram.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!