-
1. Re: Why is JSTL not included?
camel Nov 24, 2004 10:54 PM (in response to jimpo)My understanding is that JSTL (including the expression language (EL)) is fully supported by Tomcat 5+, which ships with current versions of JBoss. I'm using JSTL and EL under JBoss 3.2.6 and 4.0.0.
I did have a problem initially with JBoss (an older version, maybe 3.2.3) finding the JSTL .tld files. I fixed it by adding the following to the end of my web.xml file:<!-- JSTL Tag Library Descriptors --> <taglib> <taglib-uri>http://java.sun.com/jsp/jstl/core</taglib-uri> <taglib-location>/WEB-INF/jstl/c.tld</taglib-location> </taglib> <taglib> <taglib-uri>http://java.sun.com/jsp/jstl/xml</taglib-uri> <taglib-location>/WEB-INF/jstl/x.tld</taglib-location> </taglib> <taglib> <taglib-uri>http://java.sun.com/jsp/jstl/fmt</taglib-uri> <taglib-location>/WEB-INF/jstl/fmt.tld</taglib-location> </taglib> <taglib> <taglib-uri>http://java.sun.com/jsp/jstl/sql</taglib-uri> <taglib-location>/WEB-INF/jstl/sql.tld</taglib-location> </taglib> <taglib> <taglib-uri>http://java.sun.com/jsp/jstl/functions</taglib-uri> <taglib-location>/WEB-INF/jstl/fn.tld</taglib-location> </taglib>
And I have those 5 .tld files in my WAR file in /WEB-INF/jstl/ as indicated above.
Also note that I am using the web.xml 2.4 spec version, not sure if this makes any difference. -
2. Re: Why is JSTL not included?
jimpo Nov 25, 2004 5:29 AM (in response to jimpo)OK, so it might be that JSTL is included, but to "activate" it you need to include .tlds and add the definitions to your web.xml?
The alternative way (dropping standard.jar and jstl.jar to WEB-INF/lib) seems much less hassle and I think I will use it. -
3. Re: Why is JSTL not included?
camel Nov 25, 2004 10:15 PM (in response to jimpo)Actually I just checked, and I DO have jstl.jar and standard.jar in my /WEB-INF/lib/ directory of my war file. I tried removing them and I got an exception "javax.servlet.ServletException: org.apache.taglibs.standard.tag.rt.core.IfTag....". So it would seem you do need those jar files in the WAR. Sorry I didn't mention that in my previous message.