Charles Gillan wrote: > Ok, I know it seems that this question turns up a lot > (for previous releases)
Only when folks ignore the Servlet specification and/or the Tomcat documentation. > Followed a tutorial on the "javaboutique" web site; actually > seems to be for tomcat 4, but I did not believe this basic > servlet test would have changed (??) That tutorial is wrong on so many levels I don't know where to start. I guess one step at a time... > 1. I downloaded and installed Tomcat 6.0.20 on my own id, Linux Red Hat 5 > system, Good - no issues here. > 2. Created Hello.html and Hello.jsp as per tutorial, in sub-directory > INSTALLATION_DIR/webapps/ROOT/Hello Not how I'd do it. You really should be creating a new webapp rather than adding to the ROOT web application but it will work. > 3. Compiled servlet HelloServlet as per tutorial and placed into > sub-directory > INSTALLATION_DIR/webapps/ROOT/WEB-INF/classes Now things are really heading the wrong way. Packageless classes are a bad idea on so many levels and are not permitted in some cases (I forget which - check the Servlet and/or JSP specifications for the exact details). > 4. Initially pointed my browser at > http://<my_web_address>:8080/servlet/HelloServlet And it gets worse. That looks like you are trying to use the invoker servlet - something that is so fundamentally flawed it has been disabled/deprecated as long as I can remember and has been removed entirely for Tomcat 7. > 5. Tried editing > INSTALLION_DIR/ROOT/WEB-INF/web.xml > to set in particular the url-pattern but still got the 404 message. Without knowing what you edited it is hard to comment. > 6. Then edited the INSTALLATION_DIR/conf/server.xml file to uncomment > the INVOKER servlet option. It it wasn't clear already, Invoker == bad idea. And as an aside, if you really want to shoot yourself in the foot badly enough to want to use the invoker, server.xml isn't the file you edit. > 7. I do notice in the catalina.out log file that there is an exception > being thrown > wit a a message regarding Security exception - that the Invoker is a > privileged mode > and that the "examples" directory cannot be handled. Good. The logs contain lots of useful information. It is always better to post the entire exception message. Paraphrasing it could lead to people giving you the wrong advice. > Thanks in advance. Hopefully you have spotted some common themes here: - don't use the invoker - read the specs - read the Tomcat docs In particular, I'd strongly recommend this: http://tomcat.apache.org/tomcat-6.0-doc/appdev/index.html Mark --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org