tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aksel Schmidt <...@terma.com>
Subject RE: 404 jsp file not found
Date Mon, 19 Mar 2001 12:45:17 GMT
Just a shoot at it:
try to make the 'docBase' in the context nodes in server.xml to ABSOLUTE
paths - and remember to address them right in your browser in regards to the
'path'-attribute:
e.g.:
        <Context path="/examples" 
                 docBase="C:\apps\jakarta-tomcat-3.2.1\webapps\examples" 
                 crossContext="false"
                 debug="0" 
                 reloadable="true" > 
        </Context>

In your browser, you would not want to write
localhost:8080/webapps/examples/jsp/whatever.jsp..., but only
localhost:8080/examples/whatever.jsp

best,
Aksel

-----Original Message-----
From: Shun-Luoi Daniel Fong [mailto:sdfong@engineering.uiowa.edu]
Sent: 16. marts 2001 21:44
To: tomcat-user@jakarta.apache.org
Cc: bkerstetter@arcmail.com
Subject: Re: 404 jsp file not found


Bob,
it does have something in it, shown below:

<html>
<head>
   <title>JSP Example</title>
</head>
 
<body>
 
<% String visitor = request.getParameter("name");
if (visitor == null) visitor = "World"; %>
Hello, <%= visitor %>!
 
</body>
</html>


My understanding though is that even if the .jsp file had only HTML in it,
it should still be processed and sent to the browser. But my browser says
it can't even find the file. The jasper.log gives some indication why,
entry shown below:

2001-03-15 09:58:32 - JspEngine --> /~sdfong/rubyfong/gamezone/index.jsp
2001-03-15 09:58:32 - ServletPath: /~sdfong/rubyfong/gamezone/index.jsp
2001-03-15 09:58:32 -    PathInfo: null
2001-03-15 09:58:32 -    RealPath:
/usr/java/jakarta-tomcat-3.2.1/webapps/ROOT/~sdfong/rubyfong/gamezone/index.
jsp
2001-03-15 09:58:32 -  RequestURI: /~sdfong/rubyfong/gamezone/index.jsp
2001-03-15 09:58:32 - QueryString: null
2001-03-15 09:58:32 - Request Params:
2001-03-15 09:58:32 - Classpath according to the Servlet Engine is:
/usr/java/jakarta-tomcat-3.2.1/webapps/ROOT/WEB-INF/classes

If you look at the line that specifies the RealPath, it indicates that it
is looking in the ROOT directory of /usr/java/jakarta-tomcat-3.2.1/webapps
and it can't find it there. I'm just not sure of how to fix the
configuration so that it looks in the right place and then sends the jsp
file to tomcat.

Any help you can give would be great.

Thanks,
Luoi



On Fri, 16 Mar 2001, Bob Kerstetter wrote:

> On 3/16/01 9:15 AM, "Shun-Luoi Fong" <sdfong@engineering.uiowa.edu> wrote:
> 
> >> I created a jsp file and put it in my public_html directory. Then when
I
> >> typed the address into the browser,
> >> http://agent.eng.uiowa.edu/~sdfong/rubyfong/gamezone/testex.jsp
> >> I get a 404 error with the following message:
> >> 
> >> Not Found (404)
> >> 
> >> Original request: /~sdfong/rubyfong/gamezone/testex.jsp
> >> 
> >> Not found request: /~sdfong/rubyfong/gamezone/testex.jsp
> >> 
> 
> Your jsp as nothing in it. It is empty. I downloaded it and looked at it.
> 
> 

-- 
D. Shun-Luoi Fong
821 Melrose Avenue
Iowa City, IA 52246
email: sdfong@engineering.uiowa.edu

-----------------------
Colossions 2:8 See to it that no one takes you captive through philosophy
or empty deception, according to the traditions of men, according to the
elementary principles of the world, rather than according to Christ.
-----------------------



Mime
View raw message