File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes tomcat can't find index.jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "tomcat can Watch "tomcat can New topic

tomcat can't find index.jsp

Chris Davies
Ranch Hand

Joined: Feb 26, 2003
Posts: 110
i cant work out why tomcat can't find index.jsp (win2kpro). its in the root directory and tomcat is running (its telling me the page is unavailable).
the following is the results of the localhost_log.2004-03-09

while the following is the result of the localhost_examples_log.2004-03-09

it doesn't give me the tomcat 404 error page but give me the ie 5.5 erro page ?
my environemnt variables seem to be in order ? can't figure it ?

One day all greenhorns will run free ...
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

a couple things:
1) you're using 4.1.12, and the current version is 4.1.30. Lots of bug fixes and enhancements since 12, so is there a chance you can upgrade?

2) you're using the 'LE' (light edition). This was a badly executed version of Tomcat that will only run with JDK 1.4 and above. I'd try the non-LE version.

also, 'not found' is maybe not 100% accurate. it gives you the IE 5.5 error page... does that mean the 'friendly error' page? I'd turn this feature off for IE (found under Tools | Internet Options). That way you see the *real* error page that tomcat gives you.
Chris Davies
Ranch Hand

Joined: Feb 26, 2003
Posts: 110
i've installed 4.1.30 and am getting a 404 from a simple hello class which is in my root directory.
heres the jsp

and heres the simple class file which i've put in root/web-inf/classes

i've stopped and started tomcat but still get a 404.
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13036
Put the class in a package.
Define the servlet in web.xml for the root directory.
You are probably trying to use the /servlet/HelloServlet URl approach - this requires the "invoker" servlet which is present in Tomcat 4 but turned off by default. You are better off not using the invoker.
See this FAQ here at the ranch for more.
I agree. Here's the link:
subject: tomcat can't find index.jsp
It's not a secret anymore!