tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "J. Mark Brooks" <jmbro...@bigfoot.com>
Subject Servlet problem solved.
Date Mon, 04 Sep 2000 13:47:20 GMT
Just in case anyone else sees my messages regarding problems running
servlets, Simon helped me out, and the problem is solved.

To summarize, you can run any servlet directly using the default
Tomcat setup if your servlet is compiled in the /WEB-INF/classes directory
of your application root directory (for the examples directory, 
this was/is webapps/examples/WEB-INF/classes) and you invoke it using
<application root directory>/servlet/<servlet-name>.  For example:

http://localhost:8080/examples/servlet/SimpleServlet

will run the SimpleServlet provided in the Tomcat examples directly.
Note that this is a virtual mapping -- you do NOT need a servlets
directory to do this.  If you will look at web.xml in the /conf directory
of your Tomcat install, you will see the default invoker routine that
has set this up.

Also, for those of us (guilty) that tried to figure this out by
copying HelloWorldExample.class outside of the examples setup to
our own directory, notice that there is a locale properties file that
is also needed, or you will get an error.  Neglected to read the source
and see that something a little extra was going on.

-- 
---------------------------------------
J. Mark Brooks
Sun Certified Programmer for Java 2
http://www.uncg.edu/~jmbrook2


Mime
View raw message