Jered, Do you have a web.xml file which describes and maps your servlet?
This should be placed in $CATALINA_HOME/webapps/myapp/WEB-INF Have a look at the examples app for examples. Hope this helps. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Dienstag, 26. November 2002 17:05 To: [EMAIL PROTECTED] Subject: help for newbie? Greetings to all. I am new to JSP and Tomcat - but trying diligently to learn quickly. I have what are most probably basic questions. I am using the latest, so I assume, Tomcat 4.1.12. I am attempting to create a Webapp and Servlet. I get the Tomcat 404 error, "The Requested resource is not available." I suspect I have two problems(more details follow basic descriptions): 1. My servlet isn't recognized once compiled from .java to .class using latest java 1.4.1_01 javac command. 2. I think my webapp is not recognized. DETAILS What I tried: after inital failure, I attempted copying my .class file to the example directory and executing with localhost:8080/examples/servlet/MyServlet just as the HellowWorld servlet is called in an attempt to eliminate possible causes. No luck with this. (I had restarted Tomcat after pasting .class file.) I also tried copying and pasting the HelloWorldExample .class file to my webapp directory and it would not execute. My webapp Directory (courtesy of WROX Professional JSP [which has not a few typo's]: %TOMCAT%\ch03\WEB-INF\classes\com\wrox\projsp\ch03\app1\ and the URL that should activate it: localhost:8080/ch03/servlet/com.wrox.projsp.ch03.app1.MyFirstServlet I changed the laboriously long .myfirstwebapp. to .app1. both in the package declaration of my .class as well as the call the attempted activation URL. If this is the wrong place to ask for help with basics such as this, plese forgive me - I am hoping this is the place and am all too happy to go where directed for answers. If this is the right place, all help is appreciated. Kind regards, Jered p.s. java follows package com.wrox.projsp.ch03.app1; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpRequest; import javax.servlet.http.HttpResponse; import javax.servlet.ServletException; public class MyFirstServlet extends Httpservlet { public void doGet (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setConentType("text/plain"); PrinWriter out = response.getWriter(); out.println("Frustration: bane of inspiration"); } } -=| Just say NO to post-modernism. |=- -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
