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

Servlets HTTP Status 404

 
pavankumar varanasi
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HTTP Status 404 -

type Status report

message

description The requested resource () is not available.


I created a folder named "First" here C:\Tomcat 6.0\webapps

so, C:\Tomcat 6.0\webapps\First

Here i created "WEB-INF" folder

under that "web.xml" file and "classes" folder

I wrote HelloServlet.java and compiled it


I placed HelloServlet.class file under classes folder

my web.xml looks like this



I started tomact, there i found folder named "First" and clicked on that

then URL is

http://localhost:7777/First/

I found 404 error

then i typed

http://localhost:7777/First/first

even then it is showing same error

Can any one help me.




1.jpg
application status in tomcat
[Thumbnail for 1.jpg]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64623
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you read the ServletsFaq (⇐ click this link) on this issue? It points out a number of errors that you've made.
 
pavankumar varanasi
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tried creating package. still getting error
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13055
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you place the compiled class file under classes according to the package name?

Note that the server must be restarted after changes to web.xml and class files.

Double-check that Tomcat is recognizing "First" as holding a web application by placing a plain index.html file there. If you can't open http://localhost:7777/First/index.html then there is probably something wrong with your directory structure.

Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic