This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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.
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