[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


Servlet - Requested Resource is not available

Posted on 2009-02-15
Medium Priority
Last Modified: 2012-06-21
I have a servlet named ControllerServlet in this directory C:\Tomcat 6.0\webapps\burnaby\WEB-INF\classes\  
I have the following deployment descriptor.  I keep getting the error that the requested resource is not available.  I use this link on my local machine.  http://localhost:8081/burnaby/servlet/ControllerServlet

I am stuck and am not sure what I am doing wrong.  

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
  PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
  <!-- Define the controller servlet -->
    <!-- Define initial parameters that will be loaded into 
       the ServletContext object in the controller servlet -->

Open in new window

Question by:monica73174
  • 3
LVL 92

Expert Comment

ID: 23647276
try moving ControllerServlet class into a package

LVL 92

Expert Comment

ID: 23647282
eg. to move it into package controller you would

1. add package statement to ControllerServlet class

package controller;

public class ControllerServlet ....

2. The class will now be in WEB-INF/classes/controller

3.  change mapping to:


LVL 92

Accepted Solution

objects earned 2000 total points
ID: 23647289

thats also missing a closing

Author Comment

ID: 23647311
I had the servlet-mapping inside the servlet tag.  Your last answer helped a lot.

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses
Course of the Month19 days, 7 hours left to enroll

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question