File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "HTTP Status 404 - /ServletDemoOne/" Watch "HTTP Status 404 - /ServletDemoOne/" New topic
Author

HTTP Status 404 - /ServletDemoOne/

mukul kulshrestha
Greenhorn

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="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
<display-name>ServletDemoOne</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<servlet>
<description></description>
<display-name>ClientBrowserInfoServlet</display-name>
<servlet-name>ClientBrowserInfoServlet</servlet-name>
<servlet-class>com.infy.enr.servlets.ClientBrowserInfoServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ClientBrowserInfoServlet</servlet-name>
<url-pattern>/info</url-pattern>
</servlet-mapping>
</web-app>
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....


VIJINDAS
Devaka Cooray
ExamLab Creator
Saloon Keeper

Joined: Jul 29, 2008
Posts: 2885
    
  13

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
My Home Page -- Twitter Profile -- JavaRanch FAQ -- How to Ask a Question
David Newton
Author
Rancher

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


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

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: http://aspose.com/file-tools
 
subject: HTTP Status 404 - /ServletDemoOne/
 
Similar Threads
struts1
Servlet Annotations
how to call JSP from Servlet
HTTP Status 404
HTTP 404 error problem