How-To Article
NOVELL APPNOTES
November 2001
51
How to Install and Configure
NetWare Enterprise Web Server or
Apache Web Server with Tomcat
Ulrich Neumann
Technical Director
GNE – Grebe Neumann Gliwa GmbH, Germany
Many of you have heard about Tomcat, but may not know how to install and
configure Tomcat with NetWare Enterprise Web Server, Apache or both
simultaneously. Tomcat is the reference implementation for Servlets 2.2 and Java
Server Pages 1.1. This AppNote discusses the installation of Tomcat and tells how
to integrate Tomcat with NetWare Enterprise Web Server and Apache Web
Server for NetWare.
Contents:
• Introduction
• Installing Tomcat
• Integrating Tomcat with NetWare Enterprise Web Server
• Installing Apache
• Integrating Tomcat with Apache
•Conclusion
To p i c s Tomcat, NetWare Enterprise Web Server, Apache
Products NetWare Enterprise Web Server
Audience network designers, administrators, integrators
Level intermediate
Prerequisite Skills familiarity with Web Servers
Operating System NetWare 5.x, NetWare 6
Tools n/a
TOMCAT_HOME=sys:\jakarta-tomcat-3.2.2
CLASSPATH=$CLASSPATH;$TOMCAT_HOME/lib/ant.jar
CLASSPATH=$CLASSPATH;$TOMCAT_HOME/lib/jasper.jar
CLASSPATH=$CLASSPATH;$TOMCAT_HOME/lib/jaxp.jar
CLASSPATH=$CLASSPATH;$TOMCAT_HOME/lib/parser.jar
CLASSPATH=$CLASSPATH;$TOMCAT_HOME/lib/servlet.jar
CLASSPATH=$CLASSPATH;$TOMCAT_HOME/lib/webserver.jar
November 2001
53
4. Create sys:\system\tomcat.ncf with the following line (all in one line):
Java -Dtomcat.home="sys:/jakarta-tomcat-3.2.2" org.apache.tomcat.startup.Tomcat
5. Restart JAVA (type “java –exit” and then “java” at the system console).
6. Type “tomcat” at the system console.
7. Test Tomcat with http://YourServerIP:8080
You can configure contexts with the URL: http://YourServerIP:8080/admin. If
you want to access your contexts with full information, you must edit
sys:\jakarta-tomcat\conf\server.xml, search for <Context path=”/admin” and
change the statement trusted=“false” to trusted=“true”. Now you can view all
contexts. If you need to log in, you should look up all predefined usernames and
passwords in sys:\jakarta-tomcat\conf\tomcat-users.xml.
Your server should have at least 256MB of RAM, or your servlets and JSP pages
will be very slow.
Integrating Tomcat with NetWare Enterprise Web Server
During the first start of Tomcat, the automatic config file sys:\jakarta-tomcat-
3.2.2\conf\obj-auto.conf is generated. This file holds all information for the
Netware Enterprise Web Server integration.
1. Edit sys:\jakarta-tomcat-3.2.2\conf\workers.properties and set the following
values:
workers.tomcat_home=sys:\jakarta-tomcat-3.2.2
workers.java_home=sys:\java
dir="sys:/jakarta-tomcat-3.2.2/webapps/examples"
# Name Translation for the admin context
NameTrans fn="assign-name" from="/admin/servlet/*"
name="servlet"
NameTrans fn="assign-name" from="/admin/*.jsp" name="servlet"
NameTrans fn="pfx2dir" from="/admin"
dir="sys:/jakarta-tomcat-3.2.2/webapps/admin"
# Name Translation for the test context
NameTrans fn="assign-name" from="/test/servlet/*"
name="servlet"
NameTrans fn="assign-name" from="/test/*.jsp" name="servlet"
NameTrans fn="pfx2dir" from="/test"
dir="sys:/jakarta-tomcat-3.2.2/webapps/test"
…
<Object name="servlet">
ObjectType fn="force-type" type="text/html"
Service fn="jk_service" worker="ajp12" path="/*"
</Object>
Place the tomcat redirector behind the Init fn=“cache-init” … line and the
<Object name=“servlet”> …</Object” before the asp2lcgi Object.
4. Shuptdown Netware Enterprise Web Server and restart it (type nswebdn and
nsweb at the system console).
5. Test NetWare Enterprise Web Server/Tomcat integration with the following
servlet: http://YourServerIP/servlet/SnoopServlet
If all is correct, you’ll get several Server and Client parameters.
November 2001
55
6. To test the predefined contexts, type the URLs listed below. You’ll be
prompted for NDS username and password to access these contexts. If you
don’t want authentication, you must add a public directory designation to
the folders sys:\apache\modules, sys:\apache\conf, and so on.