Where to place the TLD / taglib files inside the WAR

Solution Verified - Updated -

Issue

  • JBoss can not find tld file in application war file.
org.apache.jasper.JasperException: File "/WEB-INF/lib/TEST-taglib.tld" not found
    org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51)
    org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
    org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:116)
    org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:177)
    org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:386)
    org.apache.jasper.compiler.Parser.parseDirective(Parser.java:448)
    org.apache.jasper.compiler.Parser.parseElements(Parser.java:1398)
    org.apache.jasper.compiler.Parser.parse(Parser.java:130)
    org.apache.jasper.compiler.ParserController.doParse(ParserController.java:255)
    org.apache.jasper.compiler.ParserController.parse(ParserController.java:103)
    org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:194)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:360)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:341)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:328)
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:607)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:312)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:328)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
  • The same application works fine in "Weblogic 10.3.0", However it causes the above exception while migrating from "Weblogic 10.3.0" to JBoss.

  • It is verified that the tld file (TEST-taglib.tld) is in the "WEB-INF/lib" directory and the classes that it references are also contained within the same war file.

  • Is it possible to load the tlds inside the jar META-INF directory from a JBoss custom module ?

  • Getting an issue in EAP 6.2.0 as org.apache.jasper.JasperException: JBWEB004036: File "/WEB-INF/lib/mytag.tld" not found.

  • We have web application developed in Struts 2 ,previously it was on Jboss 5.1.0,at that time its working fine,recently we moved to Jboss 6.2,but now it gives mytag.tld not found error.

org.apache.jasper.JasperException: JBWEB004036: File "/WEB-INF/lib/mytag.tld" not found
  • TLD not getting loaded from jar file in war with this error:
org.apache.jasper.JasperException: JBWEB004113: The absolute uri: http://www.jboss.org/examples/tags-form cannot be resolved in either web.xml or the jar files deployed with this application

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 7.x
    • 6.x
    • 5.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content