• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Any substitute for TabLibs

 
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello
I like to know is that the TabLibs are substitute for JavaBeans.
why TabLibs are only use with JSP why not with the Servlet or simple application or others?
 
sharp shooter, and author
Posts: 1913
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Taglibs, or rather the custom tags within a tag library, and JavaBeans are both technologies for wrapping up common functionality as reusable components. Whereas JavaBeans can be used in JSP, Servlets and simple applications, custom tags are a part of the JSP specification and therefore can only be used with JSP. Essentially, JavaBeans can be reused anywhere that there is Java, while custom tags need to run inside a JSP container.
For a more detailed comparison, including examples of what you might want to use each for, check out Chapter 8 : Tag Patterns (from Professional JSP Tag Libraries) that is free to download in PDF format.
Hope that helps
Simon
 
Sheriff
Posts: 7001
6
Eclipse IDE Python C++ Debian Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To add to that a little.
If you really need to use a custom tag in a non-JSP context (say if you don't have the source code and it embodies some crucial business knowledge), you can wrap it up in a sort of pseudo-JSP which calls it's lifecycle methods.
For an example of this approach, you can look at Simon's tag tetsing framework.
 
reply
    Bookmark Topic Watch Topic
  • New Topic