It's not a secret anymore!
The moose likes Servlets and the fly likes HTTP Status 404 - /ServletDemoOne/ Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "HTTP Status 404 - /ServletDemoOne/" Watch "HTTP Status 404 - /ServletDemoOne/" New topic

HTTP Status 404 - /ServletDemoOne/

mukul kulshrestha

Joined: Sep 20, 2010
Posts: 3
hi All
I have made one servlet named as ServletDemoOne,i am getting error like

The requested resource (/ServletDemoOne/) is not available.

please help me how to resolve this ?

my web.xml has entry like

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="" xmlns="" xmlns:web="" xsi:schemaLocation="" id="WebApp_ID" version="2.5">
Soumyajit Hazra
Ranch Hand

Joined: Jun 26, 2007
Posts: 136
In your web.xml where is the entry for servlet ServletDemoOne? It contains information about some different servlet.
What is the url you are using from the browser to call the servlet?

Java Programmer | SCJP 1.5 | SCWCD 1.4
vijin das
Ranch Hand

Joined: Jun 07, 2010
Posts: 129

Your Question is not complete ....what is the name of your servlet is it ServletDemoOne??? or anything else ..
try to give give maximum information about the error....!!!
may be your application may not have been deployed properly....

Devaka Cooray
ExamLab Creator

Joined: Jul 29, 2008
Posts: 3927

Welcome to JavaRanch.
Please UseCodeTags when you post a code. It's unnecessarily hard to read the code otherwise.

Author of ExamLab ExamLab - a free SCJP / OCPJP exam simulator
What would SCJP exam questions look like? -- Home -- Twitter -- How to Ask a Question
David Newton

Joined: Sep 29, 2008
Posts: 12617

The only mapping you define is for /info.
Abimaran Kugathasan
Ranch Hand

Joined: Nov 04, 2009
Posts: 2066

<display-name> tag is used for managerial purpose of the server. You've put your servlet name there! Have a look on here

|BSc in Electronic Eng| |SCJP 6.0 91%| |SCWCD 5 92%|
Hebert Coelho
Ranch Hand

Joined: Jul 14, 2010
Posts: 754

Hello mukul, welcome to Javaranch.

1) Can you put your code between [ code] tag? (without the " " before code)
2) Can tell us where is located your *java file?
3) Maybe this link might be able to help you: Creating a Web Server

[] [Full WebApplication JSF EJB JPA JAAS with source code to download] One Table Per SubClass [Web/JSF]
David Newton

Joined: Sep 29, 2008
Posts: 12617

Hebert Coelho wrote:1) Can you put your code between [ code] tag? (without the " " before code)

Already mentioned--adding it again after that much time isn't helpful.

The issue has already been pointed out by multiple people: the servlet is not being accessed by its defined mapping.
I agree. Here's the link:
subject: HTTP Status 404 - /ServletDemoOne/
It's not a secret anymore!