5 Replies Latest reply on Jul 5, 2006 2:56 PM by patrickvankann

    unprocessed jstl tags

    rdoust

      I've just moved what had been successfully deployed under Jetty under JBoss to Tomcat 5.5.17 under JBoss 4.0.4. My jstl tags are not being processed. No errors appear anywhere. The html content contains the unprocessed jstl tags. Same .ear with embedded .war as works under JBoss/Jetty.
      Any ideas why this might happen? jstl.jar is in WEB-INF/lib directory.
      Thanks.

        • 1. Re: unprocessed jstl tags
          peterj

          Do you also have standard.jar in the WEB-INF/lib directory. It is standard.jar that contains the *.tld files.

          • 2. Re: unprocessed jstl tags
            rdoust

            Yes, one of the first things I did was to add the standard.jar to the WEB-INF/lib directory. I am not including the tld files anywhere else, and my taglib-uri declarations define them using the http://java.sun.com/jsp/jstl/core fully qualified path, with no taglib-location element. i.e.,:

            <jsp-config>

            <taglib-uri>http://java.sun.com/jsp/jstl/core</taglib-uri>


            <taglib-uri>http://java.sun.com/jsp/jstl/fmt</taglib-uri>

            </jsp-config>

            • 3. Re: unprocessed jstl tags
              peterj

              Looks like you are setting the taglibs in your web.xml file. I haven't done that in a while, so I couldn't say exactly how to fix that. So instead, let me tell you how I use taglibs in my app.

              In my jsp files, I have:

              <%@ taglib prefix="f" uri="http://java.sun.com/jstl/fmt"%>
              <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"%>


              and of course I use the tags, such as:

              <td class="formLabel"><f:message key="product.prefix" /></td>
              <td class="form"><input type="text" name="prefix"
               value="<c:out value='${prefix}'/>" /></td>


              There is nothing taglib related in my web.xml. In WEB-INF/lib I have jstl.jar and standard.jar.

              That's it.

              • 4. Re: unprocessed jstl tags
                rdoust

                I have both. Maybe I'll try removing the one from the web.xml file. I thought both were required.

                • 5. Re: unprocessed jstl tags
                  patrickvankann

                  I had this problem also (The standard tags were not being processed, but no error was thrown). However, I was able to resolve it by ensuring that my web.xml had was defined according to the servlets 2.4 xsd.

                  In other words, insure that your web.xml has this line at the top.

                  <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd"
                  version="2.4">

                  Originally I had the 2.2 dtd declared.

                  Other than that, you need to just ensure that you have the latest jstl.jar and standard.jar in your WEB-INF/lib and reference the taglib as described in your JSP pages as described above. I hope this helps.