I'm new to Tomcat; I've recently downloaded and installed (from binaries)
Tomcat 3.2 for Windows onto a WinNT 4.0 SP6a machine. I'm using IIS 4.0,
JDK1.3 (Sun's), servlet API 2.1.1 (Sun's), isapi_redirect.dll, and I'm
running Tomcat as an NT service (jk_nt_service.exe).
I've read (and re-read and re-read) all the on-line docs that come with the
Jakarta-Tomcat ZIP. I've also poured over bunches of docs and samples
found on the Web, as well as consulting the O'Reilly's "Java Examples in a
Nutshell" book.
No matter what I do, I CANNOT get a servlet to run within my own
context. I have NO problem running the demos (examples), and I *CAN* get
my servlet to run, but ONLY if I drop it into the examples\WEB-INF\classes
directory. (Therefore, I know my Tomcat installation is fine, and I know
that my servlet works.)
I've added the following to conf\server.xml between two other <Context ...>
items:
<Context path="/util"
docBase="webapps/util"
crossContext="false"
debug="0"
reloadable="true" >
</Context>
I've created webapps\util and ...\util\WEB-INF and ...\util\WEB-INF\classes.
I copied conf\web.xml to my WEB-INF directory and tweaked it down to this:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app>
<servlet>
<servlet-name>SimpleServlet</servlet-name>
<servlet-class>SimpleServlet</servlet-class>
</servlet>
<session-config>
<session-timeout>30</session-timeout>
</session-config>
</web-app>
Needless to say, the servlet's name is SimpleServlet, and it belongs to no
package.
I might add at this point that when I dropped my servlet's class into the
examples directory - the only place I can get it to run - I did NOT need to
alter the web.xml file in that location.
The best and most clear instructions I have found for how to "install" a
servlet appear in the FAQ list of the docs included with the Tomcat
installation. Yet, even after following those procedures step-by-step, I
still cannot get my servlet to run within a context I created.
HELP!!!!
- Liam
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]