22

I've been having the following problem with my GoDaddy's server. I am using JSPs with the JSTL Library. My /WEB-INF/lib folder contains the following libraries:

jstl.jar standard.jar

My JSP looks something like this:

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<p>Hello!   <%
out.print(System.getProperty("java.class.path")); 

%></p>

But I keep getting the following exception:

org.apache.jasper.JasperException: 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

Any ideas as to why it is doing that?

ROMANIA_engineer
  • 54,432
  • 29
  • 203
  • 199
Alberto_Saavedra
  • 389
  • 1
  • 2
  • 12

4 Answers4

29

You need to get the right version of JSTL, they use different URIs.

If that one's not working, try: http://download.java.net/maven/1/jstl/jars/jstl-1.2.jar (JSTL 1.2), or pull down the 1.1 JSTL jars.

There's a more detailed list of versions/URIs at coderanch.

brabster
  • 42,504
  • 27
  • 146
  • 186
4

you need to add Following jar file in your web application

jakarta-jstl-1.1.2.jar
and jakarta-standard-1.1.2.jar files

Recently I have same problem, that i have resolved by adding above two jar files

Sheo
  • 1,034
  • 12
  • 24
3

I used Tomcat6 37. As for me, I tried mentioned above solutions but still got the error. The problem solved after adding the jstl-1.2.jar to my %CATALINA_HOME%\lib directory.

Alexander Davliatov
  • 723
  • 2
  • 8
  • 13
  • That happens because the jstl-1.2.jar is somehow not available, adding it to the server libs is not a good idea, while it does solve the problem. – Johnny Bigoode Dec 07 '16 at 15:15
3

The answers here were useful to explain the problem but it did not help me diagnose why it was happening when I thought I was loading the right JSTL versions. Ultimately I had to debug the application and put a breakpoint in the TLD file processor (maybe org.apache.jasper.compiler.TagLibraryInfoImpl.getTagLibraryInfos()) to see from where it was getting the TLD files.

I then discovered that it was loading old versions of the TLD files from a jar that I did not suspect had them -- it was a dependency of the GWT (ick) subsystem. Once the offending jar was removed from my maven dependencies, the problem was resolved.

Hopefully this will help someone else in the future.

Gray
  • 115,027
  • 24
  • 293
  • 354
  • I know it's been a while, but I'm facing an eerily similar problem (also with JSTL in GWT - I'm assuming the Jetty server used by GWT's super dev mode has something to do with it). Do you happen to remember _which_ offending jar you had to remove to resolve this? – Amos M. Carpenter Jan 08 '16 at 05:33
  • Sorry but I can't remember. I think I used debug mode and looked to see which jar I was in once it stopped. Best of luck. – Gray Jan 08 '16 at 16:20
  • No worries, thanks - I'll take a poke around and see if I can find which jar it is. Can't believe it's this difficult to use GWT with JSTL... – Amos M. Carpenter Jan 12 '16 at 00:38