Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Help Java C JSP custom tags

Related Tutorials


 
 

Share on Google+Share on Google+

JSP custom tags

Advertisement
JSP custom tags are the user-defined following a special XML syntax to which JavaBean tags (useBean getProperty and setProperty) uses.

JSP custom tags

     

JSP custom tags are the user-defined following a special XML syntax to which JavaBean tags (useBean getProperty and setProperty) uses. When Servlet container processes the custom tag by invoking one or more Java class files, in much the same way that a Java class file is used to handle JavaBean calls for a JSP page. After processing the tag, the container pass it to one or more class files for handling simply by taking its name and attributes, as well as any content that may exist in the body of the tag. 

Implementing JSP custom tags

Following components are required to implement custom tags in the JSP architecture:

  • Each page requires a JSP declaration
  • Deployment Descriptor(web.xml) requires an entry
  •  special XML file and the Java classes contained in a JAR file that will be invoked to process the custom tags

This section meets these requirements and incorporate custom tags into your JSP pages. There are five steps required to implement a custom tag to implement into a JSP page

  1. Define a tag handler class.
  2. Define a tag library descriptor (TLD).
  3. Make an entry of this TLD file in the Deployment Descriptor.
  4. Reference the tag library.
  5. Use the tag in a JSP page.

 

Advertisements

If you enjoyed this post then why not add us on Google+? Add us to your Circles



Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: October 7, 2010

Related Tutorials

Discuss: JSP custom tags  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:4
subramanyam
November 9, 2011
jsp custom tags how to works

i want to how to work jsp custom tags
N.Raja
January 24, 2012
Raja mca fresher 2011

where are using jsp custom tag please mention the code
bhanu
April 28, 2012
jsp tag library

custom tag
haymar
May 18, 2012
j2EE

hello
DMCA.com