javax.servlet.ServletException: java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/ConditionalTagSupport

前端 未结 4 526
生来不讨喜
生来不讨喜 2020-12-14 01:45

I am using sitemesh to decorate the pages. I am using a JSP page for this. The page worked fine until I used the conditional tag. I have the jstl-i

4条回答
  •  旧时难觅i
    2020-12-14 02:22

    This exception suggests that the JSTL API is missing in the runtime classpath. You seem to have only the JSTL impl. I suggest to remove it and use jstl-1.2.jar instead which has both the API and impl bundled.

    Further, I'd also recommend to update your web.xml root declaration to comply Servlet 3.0 spec. JSTL 1.2 requires a minimum of Servlet 2.5, so it won't work very well with a Servlet 2.4 targeted project. As Tomcat 7 is a Servlet 3.0 container and Servlet 3.0 offers a lot of new cool features over 2.5, I'd go for it.

    
    

    Don't forget to fix your dynamic web project facet version in project's properties accordingly.

    See also:

    • Our JSTL wiki page

提交回复
热议问题