Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem with custom tags

Status
Not open for further replies.

dognobbler

Programmer
Jul 4, 2003
46
GB
Under directory /webapps/examples I have created a custom tag, a TLD file (examples/WEB-INF/exampleTags.tld) and have amended my web.xml file using.

<taglib>
<taglib-uri>
</taglib-uri>
<taglib-location>
/WEB-INF/exampleTags.tld
</taglib-location>
</taglib>

I have inserted a reference to the TLD into my JSP ie.

<%@ taglib prefix=&quot;example&quot; uri=&quot; %>

and my custom tags works fine.

However when I move all of the relevant files to a new folder /webapps/test I get an error telling me that the JSP cannot locate the TLD file.

When I change the taglib to a relative link ie.

<%@ taglib prefix=&quot;example&quot; uri=&quot;/WEB-INF/exampleTags.tld&quot; %>

everything works fine again. Any idea why the web.xml reference to the TLD stops working outside of the examples directory.

Thanks


Andy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top