JSTL Tomcat 6.0 Cannot find the taglib descriptor Error

Go To StackoverFlow.com

1

I am using Tomcat 6.0 and getting the same red underline saying "Can not find the tag library descriptor for "http://java.sun.com/jsp/jstl/core"

I have the basic index.jsp file with the taglib uri as follows:

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

I have added the jstl-1.2.jar under both the Tomcat as well as my webapp folders

C:\...\apache-tomcat-6.0.35-windows-x64\apache-tomcat-6.0.35\webapps\ROOT\WEB-INF\lib
C:\...\workspace\<App-Name>\WebContent\WEB-INF\lib

My web.xml file looks as below with the web-app specifications as mentioned

<?xml version="1.0" encoding="UTF-8"?>

<web-app version="2.5" 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_2_5.xsd">

I am still getting the red underlined error for tag library descriptor. Any ideas on what I am missing out ?

Thanks,

Somnath

2012-04-04 19:28
by somnathchakrabarti


0

To use tag libraries you need to add standard.jar and jstl.jar and add to your buildpath

get the jars from http://jstl.java.net/

2012-04-04 19:42
by Ramesh Kotha
I am using jstl-1.2 and web-app version 2.5 which does not require standard.ja - somnathchakrabarti 2012-04-04 20:00
Anyway the problem got solved. I got help from a friend and he extracted the c.tld file from the jstl-1.2.jar and added it under a folder "/WEB_INF/tld/c.tld" and specified it in the taglib uri instead of the default "http://java.sun.com/jsp/jstl/core" and it worked - somnathchakrabarti 2012-04-04 20:03
They moved the TLDs/ identifiers when they changed version, this depends on the version your container (Tomcat) provides also - Thomas W 2013-09-27 12:11


0

JSTL is part of the Java EE API and included in most servlet containers. But to use JSTL in our JSP pages, we need to download the JSTL jars for your servlet container. Most of the times, you can find them in the example projects of server download and you can use them. You need to include these libraries in your web application project WEB-INF/lib directory. Refer: http://www.journaldev.com/2090/jstl-tutorial-jstl-example-jstl-core-tags

2016-12-22 10:03
by somnathchakrabarti
Ads