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 the Author

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

Comments

avatar
9 Comment threads
1 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
9 Comment authors
R..#..A..#..V..#..IWayne RiestererDennis Kellyjava.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config | .toString()ClintJCL@gmail.com Recent comment authors
newest oldest most voted
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.

Wayne Riesterer
Guest
Wayne Riesterer

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

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

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 […]

ClintJCL@gmail.com
Guest
ClintJCL@gmail.com

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

Arun Menon
Guest
Arun Menon

Thanks. Was facing the same issue.

FkJ
Guest
FkJ
Eero
Guest
Eero

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

Cihan
Guest
Cihan

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