Core Java| JSP| Servlets| XML| EJB| JEE5| Web Services| J2ME| Glossary| Questions?

 

 

 

 

 

 

 

 

 

 

 

 

 

Search Tutorials

Latest Questions
Comments
 
Declaring Tag Libraries In JSP 
 

Tag libraries are declared by using the <%@taglib %> directive of the JSP. This tag has some own attributes and it's values are specified attributes specifically of the taglib directive.

 

Declaring Tag Libraries In JSP

                         

Tag libraries are declared by using the <%@taglib %> directive of the JSP. This tag has some own attributes and it's values are specified attributes specifically of the taglib directive. Attributes of the taglib directive are as follows:

  • uri
  • prifix
  • tagdir

Using all the attributes we declare the tag libraries through the <%@taglib %> directive like the following line i.e. used in the your JSP code for reuse in the JSP application. All the reusable codes are written in the specific file which must have the ".tld" or the ".tag" extension. These files are stored in the WEB-INF folder inside your JSP application directory whether in the tld folder or the tags folder. You can put all the tag files (which has the ".tag" extension) in the tags folder and all the TLD (Tag Library Descriptor) files can be put in the tld folder inside the WEB-INF folder in your JSP application directory.

If you declare the tag library through the taglib directive by using the absolute path URIs then you mention the taglib directive like the following line of the code that has to be written in the JSP application code:

<%@ taglib prifix="c" uri="http://java.sun.com/jsp/jstl/core" %>

And if you declare the tag library through the taglib directive by using the relative path of your customized tag file or TLD files then you have to mention the taglib directive like the following line of the code that has to be written in the JSP application code:

<%@taglib prifix="tagLibraryName" tagdir="/WEB-INF/AnyTagDirectory/tagFileName.tag" %>

                         

» View all related tutorials
Related Tags: java html c web jsp dynamic static script servlet sed ip page tag this log tar close js start technology

Leave your comment:

Name:

Email:

URL:

Title:

Comments:


Enter Code:

Audio Version
Reload Image
 

Note: Emails will not be visible or used in any way, and are not required. Please keep comments relevant. Any content deemed inappropriate or offensive may be edited and/or deleted.

No HTML code is allowed. Line breaks will be converted automatically. URLs will be auto-linked. Please use BBCode to format your text.

Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Training Courses
Tell A Friend
Your Friend Name
Software Solutions
Least Viewed
Most Rated
Recently Viewed
Search Tutorials

 

 
 

Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs

About Us | Advertising On RoseIndia.net  | Site Map

India News

Indian Software Development Company | iPhone Development Company in India | Flex Development Company in India | Java Training Delhi | Java Training at Noida |

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2008. All rights reserved.