Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing the 'Invalid tld file' error in tomcat. #42

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fixing the 'Invalid tld file' error in tomcat. #42

wants to merge 1 commit into from

Conversation

isu-rassilon
Copy link

These changes fix the "Invalid tld file' error happening in tomcat after version 7.0.70/8.0.36/8.5.3 (see https://bz.apache.org/bugzilla/show_bug.cgi?id=59654).

The error mentions "JSP 2.2 specification section 7.3.1" because this error arises from the tag library descriptor (tld) files being referenced via a relative path in the tag files. To elaborate: the tags are referencing the tld files via a relative path (../../tlds). The JSP 2.2 spec says the tld files cannot be under /WEB-INF/tags, but with the relative path, they have links like /WEB-INF/tags/structure/../../tlds/... One could reasonably argue that tomcat isn't checking the path properly, but this is an easy fix.

…tion section 7.3.1 alert in tomcat versions later than 7.0.70. Basically, the tags are referencing the tld files via a relative path (../../tlds). The JSP 2.2 spec says the tld files cannot be under /WEB-INF/tags, but with the relative path, they have links like /WEB-INF/tags/structure/../../tlds. One could reasonably argue that tomcat isn't checking the path properly, but this is an easy fix.
@imlovepreet
Copy link

As quick solution, you can just copy below two libraries from the lib folder of tomcat 7.0.64 and place it in your project root or if you are using maven then add these two as dependency in your pom.xml file:

jasper.jar
jasper-el.jar

This will resolve your issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants