Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

tomcat can't find index.jsp

 
Chris Davies
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
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 ?
cheers
chris
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks.
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.
cheers
chris
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13056
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic