1. place the jar and tld(for example, taglib.tld) into web-inf/lib
2. add the following into web.xml
3. in jsp
<%@ taglib uri="vnextaglib" prefix="vnex" %>
you can also put the tag classes into web-inf/classes, need not to jar them.
I also have the problem of taglibs not working. Tried the above (and a million variations in the web-client.xml file) but still no luck.
Assuming I'm working from the JBoss template project, are there modifications to the build.xml / .ant.properties required as well as the above ?
Also, how would one incorporate the building of the tag library from it's .java file ?
A simple example of using a taglib would be very much appreciated.
Is there anyway of telling what's wrong when the web-client.xml file is wrong ? I seem to just get HTTP ERROR: 404 when trying to view the JSP which is not helpful in terms of debugging the actual problem. The Ant compilation and deployment produces no errors either!
Ian (JBoss beginnner)
Have solved the problem of getting it working now - had a bug in the web-client.xml file.
Would be interested in whether there's any way of finding out more debugging info available for future errors.
For anyone else out there wanting to compile tag libs, just put the .java files under src/main/servlet then your package path. Put the .jsp and .tld under /main/web. Edit the web-client.xml file as described above.
I should say, the web-client.xml file looked like this in my case:
i.e. no need to specify package names here.
Ian (testing with the "Core Servlets" book taglibs!)