0

Hello,

jsp newbie here... I'm having trouble starting off !!

I'm using tomcat 5..5.31,
I downloaded jakarta-taglibs-standard-1.0.6, copied the files in jakarta-taglibs-standard-1.0.6\lib to web-inf folder of my application in \webapps\

Following is the exception:

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

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
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:116)
org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:317)
org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:148)
org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:430)
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:499)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1558)
org.apache.jasper.compiler.Parser.parse(Parser.java:130)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:245)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:101)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:176)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:317)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:298)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:565)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:309)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:308)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:259)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)

here's my code:

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

<html>
	<body>
		<c:out value="Hello, world !"/>
	</body>
</html>

Not sure what is going on here... after I refresh a few times, I get this :

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: Unable to load class for JSP
org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:599)
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:143)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:321)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:308)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:259)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
root cause

java.lang.ClassNotFoundException: org.apache.jsp.request_jsp
java.net.URLClassLoader$1.run(URLClassLoader.java:200)
java.security.AccessController.doPrivileged(Native Method)
java.net.URLClassLoader.findClass(URLClassLoader.java:188)
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:131)
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:63)
org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:597)
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:143)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:321)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:308)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:259)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.31 logs.

I can't seem to get the good old "hello world" working !!!

Please let me how i can get a solution to this...

3
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by peter_budo
0

I think the error is because of missing taglib entries in WEB-INF/web.xml file.

First verfiy that you have also copied the jakarta-taglibs-standard-1.0.6\tld folder into the WEB-INF

Now in web.xml file add the following entries,

<taglib>
   <taglib-uri>http://java.sun.com/jsp/jstl/core</taglib-uri>
   <taglib-location>/WEB-INF/tld/c.tld</taglib-location>
</taglib>

Edited by peter_budo: Keep It Clear - Do wrap your programming code blocks within [code] ... [/code] tags

0

Not sure why you did not downloaded Standard 1.1 Taglib that is on latest release 1.1.2

I downloaded jakarta-taglibs-standard-1.0.6, copied the files in jakarta-taglibs-standard-1.0.6\lib to web-inf folder of my application in \webapps\

Any jar files that you do not wish to share globally through Tomcat lib directory with other applications hosted on the server should be placed in TOMCAT/webapps/YOUR_APPLICATION/WEB-INF/lib

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.