Department of Computing Imperial College London
Using Personal Tomcat 6

Some Tomcat History
Personal Tomcat Setup at DoC
Recap: How to set up a Context Directory
More detailed JSP and Servlet examples

A Little Tomcat History
For several years, we attempted to build and maintain shared Tomcat servers, which many users could use to develop JSP and servlet webapps in parallel. However, they were always unreliable, and we have concluded that Tomcat's fundamental design is not suited to the teaching environment.

One of those unreliable shared Tomcat web servers still exists, but it is now deprecated (and probably broken) - we strongly recommend that you do not attempt to use it, and we do not intend to replace it!

Personal Tomcat at DoC
Instead, therefore, we have designed (and now strongly recommend) something we call Personal Tomcat: as of 1st April 2009, we have just taken the latest version of Tomcat (version 6.0.18), packaged it and installed it on every DoC Ubuntu Hardy (8.04) linux lab machine. However, on these lab machines, Tomcat has not been configured or started. That's something you need to do - hence, it's a private and personal Tomcat system.

PS: It's probably best NOT to put such personal tomcat dirs inside public_html, as that allows Apache to serve out the source code and other private stuff, which might reveal database passwords etc by accident.

How to do I find out what's Wrong?
When things don't work with Personal Tomcat, as with all previous versions of Tomcat, you'll see an incomprehensable Java stacktrace as the web page result. However, very useful debugging information comes from looking in the logs subdirectory, and you may even be able to start Tomcat in debugging mode next time by modifying the config!


Recap: How to Setup a Personal Tomcat Context Directory
To recap, here's the procedure to create a new Context directory called my-context for us to work in:


More Detailed JSP and Servlet Examples
For some more information on JSP, Servlets and Kerberos authentication in servlets, see the following documents:

JSP Tutorial
Servlet Tutorial
How to do Kerberos authentication from Java

© CSG / Apr 2009