I'm absolutely new to JSP and I'm struggelig to get some example programs running.
I use Tomcat 6.0.18 with Firefox 3.0.7. I've loaded the standard taglibs from the Sun site into C:\Java\jakarta-taglibs-standard-1.1.2\lib
and placed the two *.jar files on my CLASSPATH:
CLASSPATH=C:\Java\jakarta-taglibs-standard-1.1.2\lib\jstl.jar;C:\Java\jakarta-taglibs-standard-1.1.2\lib\standard.jar
The first line af my *.jsp file reads:
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
When I run it I get a dump:
org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application
You need to put it in the webapp's classpath, not the CLASSPATH environment variable. The CLASSPATH environment variable is only used when you manually execute javac.exe or java.exe without the -cp, -classpath or -jar arguments.
The webapp's default classpath covers the /WEB-INF/lib. Place the webapp related JAR files in there.
There is a space in the directory name where tomcat is installed: C:\Tomcat 6.0
Could that be a problem?
That shouldnt be a problem. OK do the whole exercise again . just adding only the required jar files(jstl1.2) to CLASSPATH and as well as in the lib directory. ( remove old jars)
Also as Bauke mentioned URI is wrong and use the one from FAQ
Bauke Scholtz wrote:The upgrade is not needed, the taglib URI is completely wrong and you forgot to remove the standard.jar.
Please read the aforementioned JSP FAQ.
Hi.
I installed the jstl-1.2.jar file and removed the other two.
It still does not work. In what way is the URI wrong? I see no directions in the FAQ regarding JSTL.1.2.
Hi.
I installed the jstl-1.2.jar file and removed the other two.
It still does not work. In what way is the URI wrong? I see no directions in the FAQ regarding JSTL.1.2.
org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsp/jstl-1.2/core cannot be resolved in either web.xml or the jar files deployed with this application
I see nothing in the FAQ regarding the URI for v.1.2.
If I use the URI specified for v.1.1 (<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>), I get:
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
Thank you gentlemen for your kind help.
Now it runs.
I copied the jstl-1.2.jar to jstl.jar and used the URI given for v.1.1.
Then I had to restart the browser. It seems that Firefox does some kind of buffering that interferes with the "logical" workings of the browser.