Win a copy of Succeeding with AI this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Junilu Lacar
Sheriffs:
  • Tim Cooke
  • Jeanne Boyarsky
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • fred rosenberger
  • Frits Walraven

HTTP Status 404 - /ServletDemoOne/

 
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>
 
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?
 
Ranch Hand
Posts: 129
Firefox Browser Tomcat Server Java
  • 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....
 
Sheriff
Posts: 6600
1253
IntelliJ IDE jQuery Eclipse IDE Postgres Database Tomcat Server Chrome Google App Engine
  • 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.
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The only mapping you define is for /info.
 
Ranch Hand
Posts: 2066
IntelliJ IDE Clojure 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
 
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
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.
 
Slideshow boring ... losing consciousness ... just gonna take a quick nap on this tiny ad ...
ScroogeXHTML 8.7 - RTF to HTML5 and XHTML converter
https://coderanch.com/t/730700/ScroogeXHTML-RTF-HTML-XHTML-converter
    Bookmark Topic Watch Topic
  • New Topic