Running a Stand-alone Tomcat 5.0.19 on NetWare 6
Novell Cool Solutions: Trench
By Stig Sørensen
Digg This -
Posted: 31 Mar 2004
For those of you out there who wish to be on the cutting (bleeding) edge of development, here is a little tip on how to get Tomcat 5 running on NetWare. This tip is a "work in progress" tip, as some issues still need to be sorted out, but it should be enough to get started with Tomcat 5.
Like Novell does, we'll install Tomcat 5 to the "sys:/tomcat" directory. Create the directory "sys:/tomcat/5019", and extract the "jakarta-tomcat-5.0.19.zip" to this directory. Your directory structure should now look something like:
sys:/tomcat/5019/bin sys:/tomcat/5019/lib sys:/tomcat/5019/common
-and so forth.
The "bin" directory contains scripts to launch Tomcat, but since they are made for either *nix or Windows, they only serve as inspiration for what to do on NetWare.
I've made another init script for NetWare, based on the NetWare Tomcat 3.3 script and the *nix Tomcat 5 scripts, it's called "catalina.ncf" and is included in the tomcat5.zip file with this tip. Extract the "catalina.ncf" script to the "sys:/tomcat/5019/bin" directory. The script contains a line for running tomcat using the security manager, and one for running without (commented out). Try out one or the other and see what works for you.
Tomcat usually uses port 8009 for AJP communication with apache JK1/2.
This is no good, as Novell Remote Manager runs on this port too. Usually
port 8019 is used instead on NetWare, so open
in a text editor and search for 'Connector port="8009" '. Change 8009 to 8019 instead - or just use the server.xml file from the tomcat5.zip file included with this tip.
This might be a good time to add an admin account to "tomcat-users.xml"
so open up "sys:/tomcat/5019/conf/tomcat-users.xml" and add the line
"<user username="admin" password="changeme" roles="standard,manager,admin"/>". Remember to change the password "changeme" to something else. Again, you can just use the tomcat-users.xml from the zip file.
This is where tings start to get messy. As a few people in the novell.devsup.opensource group have found out, Tomcat 5 has a problem with compiling JSP pages. The JSP scripts are translated to java source just fine, but compilation fails with an io exception. It appears that the ".class" file is in fact compiled, but with a ".classtmp" extension, and renaming to ".class" is what actually fails. I've coded around the faulty renameTo() in SmapUtil.java and recompiled a new jasper-compiler.jar that appears to work. Feedback is more than welcome!
The new jar is included in the tomcat5 zip archive, copy it to "sys:/tomcat/5019/common/lib". This issue might also be solved by upgrading to a later JVM somtime in the future, so take a look at " http://forge.novell.com/modules/xfmod/project/?jvm ", and make sure you have the latest JVM. At the time of writing, the latest JVM is 1.4.2 SP1.
Now it's about time to try it out. With the current configuration, Tomcat 5 will run nicely along with the Tomcat engine already included in NetWare (used for NetStorage, WebAccess and so forth), but if you've got another standalone Tomcat instance running on ports 8080 and 8019, you need to stop that one first. To start up Tomcat 5, run the following commands from the console:
search add sys:tomcat\5019\bin catalina.ncf start
Start up your favorite browser, and have a look at "http://<servername>:8080", to make sure Tomcat is working. Once you feel confident that everything is ok, you can always add the above two commands to your "autoexec.ncf".
Tomcat 5 can be integrated with Apache 1.3 or 2.0 using either mod_jk or mod_jk2. Since we are talking "cutting edge" stuff, here are a few pointers for setting up jk2 with Apache 2.0. Please note that mod_jk2 still has some "issues". On my system it "soft abends" when unloading apache2, so you might want to stick with mod_jk if you want the extra stability. Mod_jk2 was kindly made available for NetWare on Güenter Knauf's website, so head over there and get the latest binaries. A short guide to mod_jk2 is also available Güenter's site.
Copy the downloaded "mod_jk2.nlm" to "sys:/apache2/modules". From the zip file included with this tip, extract "mod_jk2.conf" and "workers2.properties" to "sys:/apache2/conf" and the add the following line to your "httpd.conf":
You should now be ready to run apache2 with Tomcat5/jk2 integration. Try
it out by starting apache2 and head over to
or perhaps "http://<servername>/admin/",
to check out your current Tomcat configuration.
Hope this little tip gives all you cutting edge people enough info to get started with Tomcat 5 on NetWare.
Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com