Meaningless Drivel is fun!
The moose likes Servlets and the fly likes  The requested resource is not available. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark " The requested resource is not available." Watch " The requested resource is not available." New topic

The requested resource is not available.

Alpesh Gediya

Joined: Nov 23, 2009
Posts: 24
hello Friends,

I am facing The requested resource is not available error.

My webapps structure is as below.



web.xml content are as below.

<?xml version="1.0" encoding="ISO-8859-1"?>
Copyright 2004 The Apache Software Foundation

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.

<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"


<servlet-class> DemoServlet </servlet-class>


.. can any help me on this..

whenever i hit http://localhost:8080/Test/servlet/Demo.. it give me The requested resource not available.

Application deployed on tomcat smoothly.. but i am not able to access Demoservlet.

any help is appreciated.

Alpesh Gediya
Do not re-invent the wheel.
Saifuddin Merchant
Ranch Hand

Joined: Feb 08, 2009
Posts: 607

Your web.xml should be inside WEB-INF folder.

Also just place a simple jsp file helloWorld.jsp inside test and see if you are able to access it using,


Cheers - Sam.
Twisters - The new age Java Quiz || My Blog
Charles 'King
Ranch Hand

Joined: Jul 05, 2009
Posts: 56

1. Please verify your servlet is in this directory structure:

2. Why aren't you using conventional packaging of your classes? e.g. com.sun.servlets.DemoServlet

I agree. Here's the link:
subject: The requested resource is not available.
It's not a secret anymore!