Java Tomcat Accounts


Your account detail e-mail/letter
A basic knowledge of Java and Servlet technology

Using Servlets

Testing your account

To test your account is correctly set up for servlets, open up a web browser and go to /mountpoint / test2020


webserver is the name for your web server
mountpoint is the name of the mount points for servlets.

Both of these are in the account detail letter.

This should bring up a page looking like:

2020Media Apache Tomcat

Welcome to the world of servlets!

If this does not happen, then contact support at

Your Tomcat Servlet Account

Directory Structure

Home Directory/
                   html files
                                    class files
                                    jar files
                             source files
                              log files

WEB-INF Directory

In your account there will be a directory called 'WEB-INF' with a sub-directories 'classes' and 'lib'. The 'classes' directory contains the classes for the test page and also for any servlets that you generate, and the 'lib' directory contains any jar files.

The mapping between the URL's and particular servlets is controlled via the XML file 'web.xml'. For each servlet that is directly accessed via a URL there are the following lines (for the servlet 'test2020'):

    < servlet >
        < servlet-name >
        < /servlet-name >
        < servlet-class >
        < /servlet-class >
    < /servlet >

    < servlet-mapping >
        < servlet-name >
        < /servlet-name >
        < url-pattern >
        < /url-pattern >
    < /servlet-mapping >

An example version of the file, which runs the demo servlet is in the directory and it is recommended that you use this as a template.

Downloading Servlets

You can either download servlet class or jar files into the 'classes' or 'lib' directory or by downloading the source files and compiling them on the server. It is quite common for people to develop their applications 'off-line' and then just download the completed files when ready.

Compiling Servlets

Java 2 is installed on the server, and you can compile your servlets with javac.

For example the test servlet was compiled using

(in the src directory)

javac -d ../classes


Once the class files are installed, the main source of debugging information are the logs from Apache / Tomcat. These log files are available to developers on the password protected web page:


If you require further assistance then contact

Further Information

Using SSH

Using Servlets and MySQL


We hope that this page has made setting up and using servlets as painless as possible. If there is anything we have left out, or you have further comments, please send us an email at the usual



Linux Server's | NT Server's | Dedicated Server's | Domain Registration | Customer Support | Resellers | Mega Deal | Home

                                                             Copyright 1997-2001 All rights reserved.