Apache tomcat 8 Mandatory TLD element tlib-version missing or empty in TLD

1.9k views Asked by At

I have an issue with tomcat 8, it does not occur when the web application is run in Tomcat 7. details of the error

org.apache.jasper.JasperException: Mandatory TLD element tlib-version missing or empty in TLD /WEB-INF/Tags.tld
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:55)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:277)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:75)
org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:210)

The header of my Tags.tld is

<tagLib>
<tlib-version>1.0</tlib-version>
<jsp-version>2.2</jsp-version>
<short-name>EFT JSP Helpers</short-name>

...etc

so why would it be fine in Tomcat7 and not 8 ?

versions 8.0.23 and 7.0.62, thanks

2

There are 2 answers

1
user2168435 On

so i managed to figure out how to resolve this so will self-answer

there was an issue with the TLD and instead of on tomcat 8. after the change and re-deploy it was working as expected

0
Dhrumil Shah On

You need to make sure your taglib is like below

<taglib 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/jsee/web-jsptagLibrary_2_0.xsd" version="2.0">