File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

The requested resource is not available.

 
Alpesh Gediya
Greenhorn
Posts: 24
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello Friends,

I am facing The requested resource is not available error.

My webapps structure is as below.

Test-
|
|web.xml
|-META-INF
|-WEB-INF
|
|-classes
-DemoServlet.java/class
-log4j.xml

|-lib
-log4j.jar


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

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
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"
"http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>

<servlet>
<servlet-name>Demo</servlet-name>
<servlet-class> DemoServlet </servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Demo</servlet-name>
<url-pattern>/servlet/Demo</url-pattern>
</servlet-mapping>

</web-app>


.. 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.
 
Saifuddin Merchant
Ranch Hand
Posts: 607
Firefox Browser Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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,

http://localhost:8080/Test/helloWorld.jsp
 
Charles 'King
Ranch Hand
Posts: 56
Eclipse IDE Postgres Database Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic