File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Web Component Certification (SCWCD/OCPJWCD)
taglib directive for tag files
Joined: Mar 04, 2006
Mar 13, 2006 15:41:00
I know if a tag file is not inside a jar, we don't need to make a TLD file for it and just use a "tagdir" attribute to describe the location of the tag file.
But when the tag file is inside a jar/META-INF and we have to make a TLD file for it. For example, if the TLD looks like this:
In this case, when we want to use the the tag file in a jsp file, what does the taglib directive look like? Should we use the "tagdir" attribute or "uri" attribute?
Which one is right:
<%@taglib tagdir="/META-INF/tags/Header.tag" %>
<%@taglib uri="myTagFile" %>
or neither of them are right? Thank you.
SCJP 1.4<br />SCWCD 1.4
Joined: Nov 24, 2005
Mar 13, 2006 17:41:00
You can only use the uri.
According to the spec, a translation error must occur if the value of tagdir does not start with /WEB-INF/tags/.
All roads lead to JavaRanch
subject: taglib directive for tag files
Tag files in jar...how??
using uri attribute instead of tagdir
Tag files inside a JAR.
taglib-directive tagdir and uri
Tag file deployed in a JAR?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014