Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7941569
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T23:42:37+00:00 2026-06-03T23:42:37+00:00

I am just learning JSP and am testing using JSTL on Tomcat 7. I

  • 0

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?

java.lang.ClassNotFoundException: javax.servlet.jsp.tagext.TagLibraryValidator
java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/TagLibraryValidator

I’m using the following jar files.

javax.servlet.jsp.jstl-1.2.1.jar
javax.servlet.jsp.jstl-api-1.2.1.jar

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.

index.jsp

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Insert title here</title>
    </head>
    <body>
        <c:out value="JSTL works."></c:out>
    </body>
</html>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T23:42:39+00:00Added an answer on June 3, 2026 at 11:42 pm

    java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/TagLibraryValidator

    This class is part of JSP 2.0. Tomcat is a Servlet 3.0 / JSP 2.2 container. Make sure that your web.xml is declared conform Servlet 3.0.

    <?xml version="1.0" encoding="UTF-8"?>
    <web-app 
        xmlns="http://java.sun.com/xml/ns/javaee"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
        version="3.0">
    
        <!-- Config here. -->
    
    </web-app>
    

    And also that you don’t have arbitrary JAR files of a different container make/version like jsp-api.jar from Tomcat 5.5 or so in your /WEB-INF/lib. It would otherwise only conflict. See also How do I import the javax.servlet API in my Eclipse project?


    I have placed the two JSTL 1.2.1 jars in WEB-INF/lib of the test web app

    That should be sufficient. If cleaning the web.xml and the classpath still doesn’t fix the problem, perhaps you don’t have the right JARs at all. In our JSTL wiki page you can find a download link to a single jstl-1.2.jar file. Drop it in /WEB-INF/lib and remove the other JARs.


    and the CLASSPATH for my JRE.

    Please don’t do that. Just dropping the JSTL JAR in /WEB-INF/lib is sufficient. Also make sure that you don’t drop arbitrary servletcontainer-specific JARs in your JRE/lib or JRE/lib/ext. Just don’t touch those folders. Webapp-specific libraries should go in /WEB-INF/lib. If you’re using an IDE, it will then do automatically all the necessary magic. You don’t even need to fiddle in buildpath properties. The CLASSPATH environment variable is only used when you run java command in your command console and even then only when you run it without the -cp, -classpath and -jar arguments.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just started learning about JSF. In JSP file we can use <%= request.getAttribute(JsData)%>
I am just learning how to use Terracotta after discovering it about a month
I'm just learning C and am using xCode for it (not sure if it
I'm just learning how to code for the iPhone using Objective-C, and I don't
I'm just learning wcf and currently got this far. CS File: using System; using
I'm just learning Django. I am eating my own dogfood by using my app
Other than learning java, spring, hibernate, servlets, jsp's, how to use eclipse/netbeans, databases like
just learning Java and I know this may sound stupid but I have to
Just learning Automator here, but I'm trying to run a convert command on a
Just learning Flash (using version CS5) as part of a course and making my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.