If you don't already have Apache web server and Apache JServ module installed and running,
you'll need to download them from the Apache Software Foundation and install them. We
were able to find binary versions of Apache web server for both the Solaris and Windows NT
operating systems, and Apache JServ 1.1.2 for Windows NT. However, for Solaris,
Apache JServ needed to be built from the source.

(on Solaris)

> Apache Web Server 1.3.9 (binary)
> Apache JServ 1.1.2 (built from source)

(on NT)

> Apache Web Server 1.3.14 (binary)
> Apache JServ 1.1.2 (binary)

To run the JavaMailServlet, you must add the JavaMail and JavaBeans Activation Framework
jar files to the web server's system classpath. Apache JServ also requires that the
Java Servlet Development Kit 2.0 (JSDK2.0) is installed and also added to the web server's
system classpath. JSDK2.0 is a reference implementation of the Servlet API Specification Version 2.0.

When running Apache JServ in automatic mode, add wrapper.classpath properties for each
of these jar files to the servlet engine's propeties file. The default engine properties file is
jserv.properties and is usually found in Apache JServ's 'conf' directory. Wrapper properties
are used to automatically start the servlet engine.

(on Solaris)

> wrapper.classpath=/files/java/lib/JSDK2.0/lib/jsdk.jar
> wrapper.classpath=/files/java/lib/javamail-1.2/mail.jar
> wrapper.classpath=/files/java/lib/jaf-1.0.1/activation.jar

(on NT)

> wrapper.classpath=d:\java\lib\jsdk2.0\lib\jsdk.jar
> wrapper.classpath=d:\java\lib\javamail-1.2\mail.jar
> wrapper.classpath=d:\java\lib\jaf-1.0.1\activation.jar

When running Apache JServ in manual mode, add these jar files to the CLASSPATH
environment variable (this is documented in the JavaMail README file and additional
Windows NT information is provided here).

Once this is done, restart the web server.

Additional Notes

> One thing to watch out for is how the web server is referenced when using the
> JavaMailServlet on this web server. It is important to use the configured server
> name (i.e. the name assigned with the ServerName directive) in the URL. If the
> configured server name includes a domain, it must be referenced including the
> domain, even if the JavaMail.html page can be accessed without it.

> For example, Apache is configured with the ServerName set to 'shadygrove'. If the JavaMail demo is referenced by:

> http://shadygrove.east/example/JavaMail.html

> and the initail reference to the JavaMailServlet being:

> http://shadygrove.east/example/JavaMailServlet

> the user is successfully logged in. However, when an attempt is made to access the INBOX, the user is instructed to login because there is no current session. When this occurs, note that the URL referencing the JavaMailServlet no longer contains the domain originally used but the configured ServerName.

> http://shadygrove/example/JavaMailServlet

> Also note that Apache JServ does not use a SecurityManager or enforce any Java
> security policy.