• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HTTP Status 404 - /ServletDemoOne/

 
mukul kulshrestha
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
vijin das
Ranch Hand
Posts: 129
Firefox Browser Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Marshal
Pie
Posts: 4252
227
Chrome Eclipse IDE Google App Engine IntelliJ IDE jQuery Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.
Please UseCodeTags when you post a code. It's unnecessarily hard to read the code otherwise.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The only mapping you define is for /info.
 
Abimaran Kugathasan
Ranch Hand
Posts: 2066
Clojure IntelliJ IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<display-name> tag is used for managerial purpose of the server. You've put your servlet name there! Have a look on here
 
Hebert Coelho
Ranch Hand
Posts: 754
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic