Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-14880

[GSS](7.2.z) TLDs under META-INF/resources inside the web-fragment jar is not loaded

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 7.2.0.CD14
    • 7.1.2.GA
    • Undertow
    • None
    • Hide

      1. Extract the attached jsp-taglib-jar-in-war.zip
      2. Execute deploy.sh in the extracted jsp-taglib-jar-in-war
      This generates a web-fragment jar which contains taglib, thne deploy a web application which contains the taglib jar to wildfly.
      3. Access the following JSPs:

      curl -v http://localhost:8080/taglib-jar-in-war/hi.jsp
      curl -v http://localhost:8080/taglib-jar-in-war/index.jsp
      
      Show
      1. Extract the attached jsp-taglib-jar-in-war.zip 2. Execute deploy.sh in the extracted jsp-taglib-jar-in-war This generates a web-fragment jar which contains taglib, thne deploy a web application which contains the taglib jar to wildfly. 3. Access the following JSPs: curl -v http: //localhost:8080/taglib-jar-in-war/hi.jsp curl -v http: //localhost:8080/taglib-jar-in-war/index.jsp

    Description

      TLDs under META-INF/resources inside the web-fragment jar is not loaded.

      directory structure of the web-fragment jar
      taglib-jar
      |-- META-INF
      |   |-- resources
      |   |   `-- WEB-INF
      |   |       `-- tlds
      |   |           `-- hi.tld
      |   `-- web-fragment.xml
      `-- simple
          `-- HiTag.class
      
      web-fragment.xml
      <?xml version="1.0" encoding="UTF-8"?>
      <web-fragment id="WebFragment_ID"
          version="3.0"
          xmlns="http://java.sun.com/xml/ns/javaee"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-fragment_3_0.xsd">
          ...(snip)...
      
          <jsp-config>
              <taglib>
                  <taglib-uri>/HiTag</taglib-uri>
                  <taglib-location>/WEB-INF/tlds/hi.tld</taglib-location>
              </taglib>
          </jsp-config>
      
      </web-fragment>
      

      The following ERROR is thrown at the deployment:

      ERROR [org.wildfly.extension.undertow] (MSC service thread 1-8) WFLYUT0074: Could not find TLD /WEB-INF/tlds/hi.tld
      

      JSP returns "500 Internal Server Error" and Jastow throws the following ERROR when accessing the JSP which has <%@ taglib uri="/HiTag" prefix="say"%> or <%@ taglib uri="/WEB-INF/tlds/hi.tld" prefix="say"%>:

      ERROR [io.undertow.request] (default task-1) UT005023: Exception handling request to /taglib-jar-in-war/hi.jsp: org.apache.jasper.JasperException: JBWEB004036: File "/HiTag" not found
      	at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:57)
      	at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:278)
      	at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:75)
      	at org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:171)
      	at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:412)
      	at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:475)
      	at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1459)
      	at org.apache.jasper.compiler.Parser.parse(Parser.java:143)
      	at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:223)
      	at org.apache.jasper.compiler.ParserController.parse(ParserController.java:102)
      	at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:200)
      	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:354)
      	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:334)
      	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:321)
      	at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:652)
      	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:358)
      	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:403)
      	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:347)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
      	...(snip)...
      
      ERROR [io.undertow.request] (default task-1) UT005023: Exception handling request to /taglib-jar-in-war/index.jsp: org.apache.jasper.JasperException: JBWEB004036: File "/WEB-INF/tlds/hi.tld" not found
      	at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:57)
      	at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:278)
      	at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:75)
      	at org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:171)
      	at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:412)
      	at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:475)
      	at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1459)
      	at org.apache.jasper.compiler.Parser.parse(Parser.java:143)
      	at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:223)
      	at org.apache.jasper.compiler.ParserController.parse(ParserController.java:102)
      	at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:200)
      	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:354)
      	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:334)
      	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:321)
      	at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:652)
      	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:358)
      	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:403)
      	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:347)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
      	...(snip)...
      

      Note that the same war file can be deployed and the JSPs works on Tomcat 8.

      Attachments

        Issue Links

          Activity

            People

              thofman Tomas Hofman
              thofman Tomas Hofman
              Jan Stourac Jan Stourac
              Jan Stourac Jan Stourac
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: