UK Sales: 0800 035 6364 | | We'll Call You

Java Tomcat Accounts

This page describes how to use your Java Account.


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

http:// webserver /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.

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 us

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 Contact Us.

2020Media is a leading provider of small business Wi-Fi hotspots. If you want to offer free Wi-Fi to your customers or users, our service could be exactly what you are looking for. Our Hotspots are managed in the cloud, ultra-reliable and give you loads of information about behaviour patterns of your users. Read More   Read more...
2020Media introduces Moodle Hosting - UK servers and UK Moodle experts setup your site ready to use. Read more...
Special Offer for Longer Registration Periods Register or renew a .com, .net or .org domain name for 5 years we'll include 1 year free*. Read more...
2020Media is now offering zero-click installation of the popular TYPO3 content management system. Read more...

Our blog is regularly updated with news, tips and industry opinion.


  • AggieWestons
  • baker-and-mckenzie
  • arts-council-england
  • Big Finish
  • barratt-developments-logo
  • City-of-Lincoln-council-logo
  • brora-logo
  • DenisMacShane
  • Construction-Industry-Council
  • colchester