Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error: 404

 
Alamu Vinai
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1467
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you create servletclasses dir under examples dir?
If so, you have to put a package statement inside hello.java servlet file.
package servletclasses;
public class hello extends HttpServlet .... {
}
From browser please type:
http://localhost:8080/examples/servlet/servletclasses.hello
Note the DOT in servletclasses.hello
regds
maha anna
 
Alamu Vinai
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks so much Maha. It works now.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic