java.lang.ClassNotFoundException : javax.servlet.jsp.jstl.core.Config

Problem

While deploying JSF 2.0 web application to Tomcat 6.0.26, hits following jstl class not found error.


java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config
	...
Caused by: java.lang.ClassNotFoundException: javax.servlet.jsp.jstl.core.Config
	... 18 more

Solution

By default, Tomcat container doesn’t contain any jstl library. To fix it, declares jstl.jar in your Maven pom.xml file.


  <dependency>
	<groupId>javax.servlet</groupId>
	<artifactId>jstl</artifactId>
	<version>1.2</version>
  </dependency>
Note
Please refer to this JSF 2.0 release note to identify the JSF 2.0 required dependency libraries.

13 comments on “java.lang.ClassNotFoundException : javax.servlet.jsp.jstl.core.Config

  1. Thanks, that cleared my error in the first attempt.

    Reply
  2. I just removed the provided from this once you mentioned that tomcat doesnt have this. Thanks

    Reply
  3. Hi,

    Thank you for the solution but i don’t use Maven, i copied the library into /WEB-INF/lib/ but it gives the following error:

    javax.servlet.ServletException: java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/ConditionalTagSupport
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    MyServlet.doGet(MyServlet.java:22)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:635)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

    This is the content of my lib folder:
    \WEB-INF\lib

    31/05/2019 01:47 .
    31/05/2019 01:47 ..
    31/05/2019 01:15 206ÿ430 taglibs-standard-impl-1.2.5.jar

    Please help me

    Reply
  4. I have got this error when configuring Apache tiles into Spring project. I don’t know how it appears. Anyway solution works and solve my problem. Thanks much.

    Reply
  5. Yay. Mkyong, you’re a life saver. Thanks! It took me about 3 hours to find this fix 🙂

    Reply
  6. Thank you for this little tip. This is the first time I found a tip at the top of google search on ‘..some err..classNotfound,jstl…’ where I followed the simple dependency injection, and it worked like a magic charm!

    javax.servlet
    jstl
    1.2

    Reply
  7. Thanks! Google picked this up as first result and it solved my problem.

    Reply
    1. Thank for the input. Tomcat, by default, doesn’t come with jstl.jar library, and shouldn’t also. You need to get this library manually.

      Reply

Leave a Comment

Your email address will not be published. Required fields are marked *