This week's book / license giveaways are in the JDBC and Relational Databases and Java in General forums.
We're giving away four copies each of PostGIS in Action and Java Advanced Topics Training and have the authors on-line!
See this thread and this one for details.
The moose likes Tomcat and the fly likes Simple servlet not started Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Products » Tomcat
Bookmark "Simple servlet not started" Watch "Simple servlet not started" New topic

Simple servlet not started

Maria Lepschy
Ranch Hand

Joined: Jan 12, 2004
Posts: 78
I have Tomcat 5.0.25.
I can start a jsp but not a simple servlet. I have the servlet compiled class and java class in the default directory ...C:\Tomcat 5.0\webapps\ROOT\WEB-INF\classes. When I call:
I got the error message HTTP Status 404: "The requested resource is not available".

I have the variablen JAVA_HOME =C:\j2sdk1.4.2_04,
and the PATH%JAVA_HOME%\bin;%CATALINA_HOME%;C:\Tomcat 5.0\common\lib\servlet-api.jar

What can be wrong?
I hope somebody can help me.
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 12933
1. You are using a URL that requires the "Invoker" servlet - this is not a good idea, see this Javaranch FAQ on the invoker.
2. I bet you didn't put the servlet in a package. Tch.
3. This is THE MOST COMMON problem mentioned in this forum - browse around in the recent posts to see more discussion.
Maria Lepschy
Ranch Hand

Joined: Jan 12, 2004
Posts: 78
Many thanks, William. Now it is working.
Your answer was a great help for me, I have tried so many times by changing something but nothing was Ok.

wood burning stoves
subject: Simple servlet not started