UofA Servlet Setup
(This is a modified version of the one that Johnathan Martin has at http://www.cs.ualberta.ca/~shengjiu/ta/tutorial/install_servlet.html)
1. Copy ~janvik/.tomcatrc to your home directory.
2. Create a directory for your Tomcat stuff. I use "tomcat", but it does
not matter what it is named. The directory does not need to be permitted to
3. Create subdirectories within your Tomcat dir. You need "conf", "logs",
"work", and "webapps". You will also need a "WEB-INF" dir within "webapps"
and a "classes" dir within "WEB-INF".
4. Copy ~janvik/tomcat/conf/server.xml to your "conf" diretory
5. Edit the server.xml file to reflect your installation. I have marked the
places that need changes with a "CHANGE HERE" comment. Every student needs
two ports, you can check your ports here.
6. Create a directory within webapps for your work. This is where your html
files will go. Java classes go into WEB-INF/classes in this directory.
7. Start Tomcat with /usr/local/tomcat/bin/tomcat.sh start -config
8. Stop Tomcat with /usr/local/tomcat/bin/tomcat.sh stop -config
You will need to be on one of the undergrad Sun workstations for Tomcat to
run (csu0*, csu2*, csu5*, csu6*). You can then access your instantiation of
Tomcat with the url: http://csu???.cs.ualberta.ca:<your-port-number>/<your-user-id>.
********** IMPORTANT **********
You must stop your Tomcat server before you logout. The server does not quit when you logout and will stay running indefinitely using up resources.
Keep an eye on your servlets so they don't spin out of control and drive the machine's load up by 8-9
Do not run Tomcat servers on non-lab machines (especially ohaton).
As the commandline to start (and stop) Tomcat are quite long, I recommend that you add two "alias" to ".bashrc" for starting and stopping Tomcat.
alias startTomcat='/usr/local/tomcat/bin/tomcat.sh start -config ~janvik/tomcat/conf/server.xml'
alias stopTomcat='/usr/local/tomcat/bin/tomcat.sh stop -config ~janvik/tomcat/conf/server.xml'