How do I get servlets to work on tomcat 6.0.20 ?
HTML and JSPs are working for me.

Ok, I know it seems that this question turns up a lot
(for previous releases), having Googled and read 
many sites over the last week. But none of the
advice works for me. So, I am turning to the list.

Detaisl fo what i have been trying to do follow

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 (??)

Note that I shutdown/started between each step below (many times actually).

1. I downloaded and installed Tomcat 6.0.20 on my own id, Linux Red Hat 5 
system,
    started the server on port 8080, checked access to the Tomcat supplied 
    pages - all ok.
    Also installed Sun JDK 1.5 onto my own id and point JAVA_HOME and JRE_HOME 
at it.
    Initially was running using rocket 64 bit JRE.

2. Created Hello.html and Hello.jsp as per tutorial, in sub-directory

            INSTALLATION_DIR/webapps/ROOT/Hello

     Pointed my browser (IE 7) at these and they WORK fine.

3.  Compiled servlet  HelloServlet as per tutorial and placed into sub-directory

          INSTALLATION_DIR/webapps/ROOT/WEB-INF/classes

4.   Initially pointed my browser at 

             http://<my_web_address>:8080/servlet/HelloServlet

      and got the well known HTTP 404 message

5.   Tried editing 

            INSTALLION_DIR/ROOT/WEB-INF/web.xml

       to set in particular the url-pattern but still got the 404 message.

6.    Then edited the  INSTALLATION_DIR/conf/server.xml file to uncomment
        the INVOKER servlet option.

        When trying to access

             http://<my_web_address>:8080/servlet/HelloServlet

        I not longer get the 404 message but a message from IE 7 staying that 
it could 
        contact the web site but more or less that the file was not available.

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.

        Needless to say I have not touched the examples directory.

Thanks in advance.

Charles. 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to