This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Servlets and the fly likes Error: 404 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Error: 404" Watch "Error: 404" New topic

Error: 404

Alamu Vinai

Joined: Feb 01, 2001
Posts: 19
I installed tomcat and I can see files in my root folder.
Eg. webapps/examples/servlet/helloworld
If I try to create a folder called servletclasses and created a file called hello and compiled. The following error was given. How to solve this?
Error: 404
Location: /examples/servlet/servletclasses/hello
maha anna
Ranch Hand

Joined: Jan 31, 2000
Posts: 1467
Did you create servletclasses dir under examples dir?
If so, you have to put a package statement inside servlet file.
package servletclasses;
public class hello extends HttpServlet .... {
From browser please type:
Note the DOT in servletclasses.hello
maha anna
Alamu Vinai

Joined: Feb 01, 2001
Posts: 19
Thanks so much Maha. It works now.
wood burning stoves
subject: Error: 404
It's not a secret anymore!