JSP and Custom Tags
Earlier today I posted the following:
<<Can anyone place there custom tags any anywhere other than in the "classes" directory?
Here is my tag declaration from my .tld file.
><tag>
<name> dosomething </name>
<tagclass>
DoSomethingTag
</tagclass>
<bodycontent> empty </bodycontent>
<info>
My DoSomething Tag.
</info>
</tag>
My directory structure is as follows:
Tomcat
jakarta
webapps
myapp
WEB-INF
classes
myTags
So my JSP application works when configured as above but if I move the tag to the myTag directory and modifiy my .tld file as follows:
<tag>
<name> dosomething </name>
<tagclass>
myTags.DoSomethingTag
</tagclass>
<bodycontent> empty </bodycontent>
<info>
My DoSomething Tag.
</info>
</tag>
I get:
Internal Servlet Error:
javax.servlet.ServletException: ShowServerNameTag
at org.apache.jasper.servlet.JspServlet.service(Compiled Code)
...
Root cause:
java.lang.NoClassDefFoundError: ShowServerNameTag
at java.lang.Class.newInstance0(Native Method)>>
-
As a followup to this problem I discovered that as long as my tag "DoSomethingTag" is in the directory "classes", the path in the .tld file is totally disregarded!
What's with that?!!!

