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

4

2 回答 2

0

要使用标签库,您需要添加standard.jarjstl.jar添加到您的构建路径

http://jstl.java.net/获取 jars

于 2012-04-04T19:42:14.790 回答
0

JSTL 是 Java EE API 的一部分,并包含在大多数 servlet 容器中。但是要在我们的 JSP 页面中使用 JSTL,我们需要为您的 servlet 容器下载 JSTL jar。大多数时候,您可以在服务器下载的示例项目中找到它们并使用它们。您需要将这些库包含在您的 Web 应用程序项目 WEB-INF/lib 目录中。参考: http ://www.journaldev.com/2090/jstl-tutorial-jstl-example-jstl-core-tags

于 2016-12-22T10:03:49.570 回答