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.
author image

mkyong

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. Read all published posts by

Comments

avatar
11 Comment threads
1 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
11 Comment authors
NaziaMohammed ESSABRIR..#..A..#..V..#..IWayne RiestererDennis Kelly Recent comment authors
newest oldest most voted
Cihan
Guest
Cihan

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

Eero
Guest
Eero

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

FkJ
Guest
FkJ
Arun Menon
Guest
Arun Menon

Thanks. Was facing the same issue.

ClintJCL@gmail.com
Guest
ClintJCL@gmail.com

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

trackback
java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config | .toString()

[…] strange because I had mentioned jstl-1.2 in my pom.xml. A quick search on Google returned a lot of answers to this problem, but none of them worked for me. Then I found the root cause of the problem myself […]

Dennis Kelly
Guest
Dennis Kelly

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

Wayne Riesterer
Guest
Wayne Riesterer

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

R..#..A..#..V..#..I
Guest
R..#..A..#..V..#..I

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.

Mohammed ESSABRI
Guest
Mohammed ESSABRI

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

Nazia
Guest
Nazia

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