1

I have been trying to make the JSTL library work for days and every time I tried it Tomcat kept showing.

The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application

I am using Tomcat 7.0.61 and I download the latest version of JSTL from Tomcat portal, I put three JSTL files in the WEB-INF/lib directory of my app

This is my directory structure

myapp
 - WEB-INF
   - lib
      - taglibs-standard-impl-1.2.5.jar
      - taglibs-standard-spec-1.2.5.jar
      - taglibs-standard-jstlel-1.2.5.jar
   - classes
index.jsp

and this is my index.jsp

<!DOCTYPE HTML>
<html lang="en">
<head>
    <title>JSP TEST on UBUNTU 12.10</title>
</head>
<body>
<%@ page import="java.io.*" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%!
public void getRequest(JspWriter out, HttpServletRequest request) throws IOException {
    String req = request.getParameter("text");
    out.println(req);
}
%>
<% getRequest(out, request); %>
</body>
</html>

I don't know which JSTL files I have to put in WEB-INF/lib or any configuration is missing in my app.

Please help

H.J. Frost
  • 303
  • 1
  • 3
  • 14
  • possible duplicate of [JSTL 1.2 - The absolute uri: http://java.sun.com/jstl/core cannot be resolved](http://stackoverflow.com/questions/4928271/jstl-1-2-the-absolute-uri-http-java-sun-com-jstl-core-cannot-be-resolved) – Jens Apr 20 '15 at 18:37

2 Answers2

0

Make sure to have your web.xml to be compliant and web-app compatible with Servlet3.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">
..
..

... ..

Milind J
  • 517
  • 5
  • 10
0

Another reason for this error is jar filtering in Tomcat.

E.g. if the tomcat.util.scan.StandardJarScanFilter.jarsToScan property is set in the tomcat/conf/catalina.properties file, this could stop Tomcat from scanning the taglibs*.jar files.

df778899
  • 10,703
  • 1
  • 24
  • 36