Hi All,
I'm new to Tomcat and Servlets, I'm having a problem with one of my
first Servlets:
This is my program:
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;
public class TestingServlet extends HttpServlet {
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
PrintWriter out = response.getWriter();
out.println("");
out.println("");
out.println("Servlet Testing");
out.println("");
out.println("");
out.println("Welcome to the Servlet Testing Center");
out.println("");
out.println("");
}
}
This is my web.xml file:
http://java.sun.com/dtd/web-app_2_3.dtd";>
Testing
TestingServlet
I'm using Tomcat version 5.0.28.
I create the Directory structure under Tomcat, underneath the webapps
subdirectory:
myApp
|
WEB-INF
|
classes
I compile the file TestingServlet.java using
javac -classpath C:\tomcat\common\lib\servlet-api.jar TestingServlet.jar
Place the file TestingServelt.jar in the classes subdirectory.
Place the file web.xml file in the WEB-INF subdirectory.
I start Tomcat. The manager application says it there, and it seems to be
okay.
I type in the address bar of IE the following
http://locahost:8080/myApp/servlet/TestingServlet
I get the following message, from Tomcat
The requested resource (/myApp/servlet/TestingServlet) is not available.
I know it should be pretty simple, but sometimes the simplest things are the
hardest to correct!
Any suggestions most appreciated.
Thanks Marco Mastrocinque
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]