File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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.
I agree. Here's the link:
subject: Error: 404
jQuery in Action, 3rd edition