File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Custom TagLib Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Custom TagLib" Watch "Custom TagLib" New topic
Author

Custom TagLib

Chad Dalton
Greenhorn

Joined: Feb 19, 2003
Posts: 20
I am trying to get a Simple Tag to work Currently here is what I have:
WEB-INF\SimpleTag.tld

WEB-INF\web.xml

WEB-INF\lib\taglib.jar

Source of SimpleTag.class

tagtest.jsp

I have tried to make this as simple as possible. Most of this was copied from the Sun custom tag lib tutorials but I just can't get it to work. The error that I get from Tomcat 4.1.18 is:

Much help is appreciated,
thanks,
--chad
Chad Dalton
Greenhorn

Joined: Feb 19, 2003
Posts: 20
Bahh,
After changing /simple-tag in tagtest.jsp and web.xml to simple-tag it worked fine! Hope this helps somebody else!
Ok now I assume this is because I am using this custom tag in a sub webapp [localhost/myapp/tagtest.jsp] and the / was starting at doc root. What are the implications of not qualifying the path, if any? Should I change simple-tag to /myapp/simple-tag? Or does this not matter at all?
thanks,
--chad
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Custom TagLib
 
Similar Threads
TLD and Deployment Descriptor not Working
org. apache. jasper.JasperException:
Problem using Custom tag in JSP
TLD and Deployment Descriptor not Working
Failed to load or instantiate TagExtraInfo class: org.apache.struts.taglib.html.MessagesTei