File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Benefits of custom tags

 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
What are the benefits of custom tags?
 
Valentin Crettaz
Gold Digger
Sheriff
Posts: 7610
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From The JSP 2.0 Specification:

JSP.7.1.1 Goals
The tag extension mechanism described in this chapter addresses the following
goals. It is designed to be:
- Portable - An action described in a tag library must be usable in any JSP con-tainer.
- Simple - Unsophisticated users must be able to understand and use this mech-anism.
Vendors of JSP functionality must find it easy to make it available to
users as actions.
- Expressive - The mechanism must support a wide range of actions, including
nested actions, scripting elements inside action bodies, and creation, use and
updating of scripting variables.
- Usable from different scripting languages - Although the JSP specification
currently only defines the semantics for scripts in the Java programming lan-guage,
we want to leave open the possibility of other scripting languages.
- Built upon existing concepts and machinery- We do not want to reinvent what
exists elsewhere. Also, we want to avoid future conflicts whenever we can
predict them.

In clear, they allow you to define your own set of tags (i.e. your own tag library) as an extension of the existing set of basic JSP tags.
 
Rashid Ali
Ranch Hand
Posts: 349
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An important benefit of custom tag is it's 'reusability' means you can once make a custom tag functional and can use its functionality/logic in multiple applications.
For example: you've defined a database connection in a custom tag, opening, calling db, iterating records and such types of things can be once defined in your tag and be used in multiple applications and you don't have to bother to write it again for other app.
Hope it helps a bit and clarifies your querry.
Good luck
Rashid
 
Simon Brown
sharp shooter, and author
Ranch Hand
Posts: 1913
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out this thread for some more points...
Simon
 
Frank Carver
Sheriff
Posts: 6920
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic