I've been racking my brain for days trying to figure out WHY I cannot get this servlet to work. Hopefully someone has an idea. Im running tomcat 4.1 on IIS . From what I've been reading and the directions I'm following from a WROX book is that you don�t need the web.xml file if your inside webapps for the browser to see it.
Directory ch03 is inside the webapps dir. Underneath ch03 I have classes/com/wrox/jsp/ch03/myapp/MyServlet Wrox tells me to type this into the browser. http://localhost:8080/ch03/servlet/com.wrox.jsp.ch03.myapp.MyServlet I didn�t use the (servlet) because I don�t have a directory servlet and Im having a hard time figuring out why that needs to be there. I also try it with the (servlet) and nothing. I put an index page in the ch03 directory and It pulls that up fine. It just will not find this servlet??? The class path is set , everything works except for this. This is the code for the servlet. Am I just set up wrong, Ive been everywere I RTFM and Im stumped. It SHOULD WORK !!!!!???? but it does not. package com.wrox.jsp.ch03.myapp; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.ServletException; public class MyFirstServlet extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/plain"); log("doGet was just called"); PrintWriter out = response.getWriter(); out.println("This is my first Servlet"); } } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
