*
The moose likes Servlets and the fly likes Servlets HTTP Status 404 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlets HTTP Status 404" Watch "Servlets HTTP Status 404" New topic
Author

Servlets HTTP Status 404

pavankumar varanasi
Greenhorn

Joined: Sep 30, 2012
Posts: 2
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.







[Thumbnail for 1.jpg]

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60782
    
  65

Did you read the ServletsFaq (⇐ click this link) on this issue? It points out a number of errors that you've made.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
pavankumar varanasi
Greenhorn

Joined: Sep 30, 2012
Posts: 2
Tried creating package. still getting error
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Servlets HTTP Status 404
 
Similar Threads
404 Error
The requested resource (/review/HelloServlet) is not available
Configuring Tomcat...
HTTP status 404 error from Tomcat
Unable to load servlet in Tomcat 5.5