java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/TagLibraryValidator

前端 未结 1 760
萌比男神i
萌比男神i 2020-11-27 23:41

I followed the guide in this link to install JSTL but I got the following error when I tried to launch my JSP page:

java.lang.NoClassDefFoundError: ja

相关标签:
1条回答
  • 2020-11-27 23:45

    The javax.servlet.jsp.tagext.TagLibraryValidator class is introduced in JSP 2.0. This error can thus have the following possible causes:

    • You are not running a JSP 2.0 compatible serlvetcontainer. For example, Tomcat 4.x or 5.0. You need at least Tomcat 5.5 or better, 6.0, or even better, 7.0. Just the latest version.

    • You have cluttered the /WEB-INF/lib with arbitrarily downloaded jsp-api.jar or j2ee.jar files or whatever contains the JSP API, which originates from a completely different servletcontainer make/version which in turn was actually not JSP 2.0 compliant. Get rid of those libraries. You don't need them. If you did this to workaround compilation errors, then you did it the wrong way. They should end up in compiletime classpath, not in the runtime classpath. See also How do I import the javax.servlet API in my Eclipse project?

    0 讨论(0)
提交回复
热议问题