Main Tutorials

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.

About Author

author image
Founder of Mkyong.com, love Java and open source stuff. Follow him on Twitter. If you like my tutorials, consider make a donation to these charities.

Comments

Subscribe
Notify of
13 Comments
Most Voted
Newest Oldest
Inline Feedbacks
View all comments
Asif Khan
1 year ago

I am still getting the same error.please help me out.

Kaustubh Dapurkar
4 years ago

Thanks, that cleared my error in the first attempt.

Nazia
4 years ago

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

Mohammed ESSABRI
4 years ago

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

R..#..A..#..V..#..I
8 years ago

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.

Wayne Riesterer
10 years ago

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

Dennis Kelly
10 years ago

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

11 years ago

I have this error, but no pom.xml … :/

Arun Menon
11 years ago

Thanks. Was facing the same issue.

FkJ
11 years ago
Eero
12 years ago

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

Cihan
13 years ago

I’m using tomcat v.7 but I’m taking same exception.