Requested Resource Not Available (Apache TOMCAT 5.0.28)
I have installed tomcat 5.0.28 and it finds its home page just fine. It also runs the examples just fine. But
any application I add to /webapps I get the 404 Requested Resource not found message. The application consists of one
.jsp file
I am running Win XP sp2
The application is deployed in $CATALINA_HOME/webapps/RequestHeaders
The url is http://localhost:8080/RequestHeaders/request.jsp
I have restarted TOMCAT restarted many times and also deleted the log files.
The jsp (request.jsp) contains the following
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix=c" %>
<html>
<body>
You sent the following request headers:
<br/>
<table border="1">
<tr>
<th>Header</th>
<th>Value</th>
</tr>
<c:forEach var="entry" items="${header}">
<tr>
<td>${entry.key}</td>
<td>${entry.value}</td>
</tr>
</c:forEach>
</table>
</body>
</html>
Any help is highly appreciated.
Thanks
Suraj99
Error message is shown below
HTTP Status 404 - /RequestHeaders/request.jsp
--
type Status report
message /RequestHeaders/request.jsp
description The requested resource (/RequestHeaders/request.jsp) is not available.
--
Apache Tomcat/5.0.28
[1488 byte] By [
scshekhara] at [2007-11-27 5:07:36]

# 7
You shouldn't have to put it in ROOT directory.
The file layout setup that you have detailed thus far seems fine.
Your web.xml file looks wrong though.
You have two definitions in there, for both 2.3 and 2.4
Seeing as you have Tomcat 5, you should remove the <!DOCTYPE > tag which declares the 2.3 Web application, and leave the stuff in the web-app tag which defines it as 2.4.
Hope this helps,
evnafets
# 8
> You shouldn't have to put it in ROOT directory.
> The file layout setup that you have detailed thus far
> seems fine.
>
> Your web.xml file looks wrong though.
> You have two definitions in there, for both 2.3 and
> 2.4
>
> Seeing as you have Tomcat 5, you should remove the
> <!DOCTYPE > tag which declares the 2.3 Web
> application, and leave the stuff in the web-app tag
> which defines it as 2.4.
>
> Hope this helps,
> evnafets
Per your advice I made the changes. I now get the following error :
message.
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:50)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:411)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:118)
org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:316)
org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:147)
org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:418)
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:483)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1539)
org.apache.jasper.compiler.Parser.parse(Parser.java:126)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:220)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:101)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:203)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:470)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
Contents of web.xml:
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
<display-name>RequestHeaders</display-name>
</web-app>
--
Please advice how to make this work.
# 9
Ok, well thats progress.
The web app is now starting up correctly, and finding your page. Thats better than the 404 error you had before.
"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"
This error message is obviously related to the JSTL tag library you are importing. You are using the JSTL1.1 uri to import the tag library.
Make sure that you have the necessary jars in the WEB-INF/lib directory (standard.jar and jstl.jar) and that they are the correct version of those jars.
If you don't have JSTL, you can download it from http://jakarta.apache.org/site/downloads/downloads_taglibs-standard.cgi