This document describes the requirements for deploying Java servlets and JSP-enabled web pages on the Department of Computing web-server doc.gold.ac.uk (aka 'igor'). It does not describe the JavaServer Pages or Java Servlet specifications and is not a tutorial on how to create servlets or JSP-enabled web pages. Assuming you have created your servlets or JSP pages, this document explains where they should be placed and how they can be referenced via the web.
The JSP/servlet engine is running on host doc.gold.ac.uk at port 8888.
Since web browsers connect to port 80 by default, this means that a URL used to
reference your servlets and JSP-enabled web pages must specify the port number
along with the hostname (and your username), as follows:
http://www.doc.gold.ac.uk:8888/~username
The JSP/servlet engine looks for your JSP pages in a directory called public_html in your home directory on the server. This directory may already exist if you have created other types of web pages on the server (.html, .php, etc). If it does not exist, you should create it and ensure that it is publicly accessible. The filenames of your JSP pages should be given the extension .jsp.
So, for example, if user ma012zx had a JSP page called Hello.jsp in their public_html directory,
it would be referenced using the URL:
http://www.doc.gold.ac.uk:8888/~ma012zx/Hello.jsp
The JSP/servlet engine expects to find the .class files for your Java servlets (or JavaBeans)
in the directory public_html/WEB-INF/classes. This means you need to create a directory
inside your public_html directory called WEB-INF and then in the WEB-INF
directory you need to create a directory called classes. Your .class files should
then be copied into the classes directory.
You can include extra or third-party packages (or any other .jar file) in your applications by placing them into a folder called lib which you should create in your WEB-INF folder.
To reference a servlet via the web, you simply add '/servlet/' to the end of your 'home' URL
and then append the name of the .class file (without the .class extension).
So, for example, a servlet called 'Hello.class' in the 'public_html/WEB-INF/classes'
directory of user ma012zx would be referenced using the URL:
http://www.doc.gold.ac.uk:8888/~ma012zx/servlet/Hello
chmod -R a+r ~/public_html/WEB-INFThis will add 'read' permissions to all files in your WEB-INF folder and its sub-folders.
Last modified on 9th April 2003 by Eamonn Martin