title: Implementing JSTL 1.2.1 in a Servlet 3.0 container on Tomcat 7
body: <p>I am just learning JSP and am testing using JSTL on Tomcat 7. I am able to successfully define and use custom tags. But when I attempt to implement JSTL the container throws two exceptions. How can I fix this so the jsp will translate properly?</p>
  
  <blockquote>
    <p>java.lang.ClassNotFoundException: javax.servlet.jsp.tagext.TagLibraryValidator
    java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/TagLibraryValidator</p>
  </blockquote>
  
  <p>I'm using the following jar files.</p>
  
  <blockquote>
    <p>javax.servlet.jsp.jstl-1.2.1.jar
    javax.servlet.jsp.jstl-api-1.2.1.jar</p>
  </blockquote>
  
  <p>I have placed the two JSTL 1.2.1 jars in WEB-INF/lib of the test web app and the CLASSPATH for my JRE. I have also marked the two jars for export in the build path options in Eclipse.</p>
  
  <p><strong>index.jsp</strong></p>
  
  <pre><code>&lt;%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%&gt;
  &lt;%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt;
          &lt;title&gt;Insert title here&lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;c:out value="JSTL works."&gt;&lt;/c:out&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>