Cameron Harr's CS462 Page
Home  About  CS 462  Contact 
Lab 3 -- Tomcat Installation / Servlets 100% Pure Vim Web Site
Home > Lab 3

 

The Servlet:

Click here for the servlet.

Log:

We first downloaded the j2sdk-1.3.1_02-linux-i386-rpm.bin file, along with the tomcat rpms from the class website. To install the java package, we did sh j2sdk-1.3.1_02-linux-i386-rpm.bin and then followed up with rpm -Uvh jdk-1.3.1_02.i386.rpm. When that was done, I uninstalled kaffe with rpm -e kaffe to get rid of some old files. Then I did a rpm -Uvh tomcat* to install the tomcat stuff and I unzipped the webapp stuff with the command tar zxvf webapp-module-1.0-tc40-linux-glibc2.2.tar.gz -C /etc/httpd/modules/ to extract those modules.

Once installed, we had to set up tomcat. We edited the /etc/tomcat4/conf/tomcat4.conf file and set the variable JAVA_HOME="/usr/java/jdk1.3.1_02". In /etc/httpd/conf/htpd.conf we added the following lines after all the LoadModule and AddModule directives`:

    LoadModule webapp_module modules/webapp-module-1.0-tc40/mod_webapp.so
    AddModule mod_webapp.c
Right before the .htaccess stuff, we added:
    # more tomcat stuff
    WebAppConnection conn warp cs462-14.cs.byu.edu:8008
    WebAppDeploy /examples conn /examples/
We made a symlink called tomcat pointing to /var/tomcat4 set up user directories by creating /var/tomcat4/webapp/ <username_tc> and setting the appropriate permissions. We edited the server.xml file making a context for each user, changing the context path to /<username_tc>, and setting privileged="true" and reloadable="true". Back in the httpd.conf file, for each user, we put:
    # one per user
    WebAppDeploy /<username_tc> conn /yourusername_tc/


For more great website ideas, visit Jaden.
Copyleft © 2002 Cameron No rights reserved.
Last Updated 01/14/02