Modifying the CLASSPATH on ocelot

Log onto ocelot, and execute the following command

cat ~downeyt/cs/public/tomcat/.classpath >> ~/.cshrc
source ~/.cshrc

Only do this once for the entire semester.

This has modified the .cshrc file with the following

#
#Define the location of Java
#
setenv JAVA_HOME /depot/J2SE-1.5

#
#This command sets the classpath that is used by java to find packages
#  servlet-api.jar: 
#    the packages for servlets and JSPs
#  {$HOME}/cgs4854/webapps/ROOT/WEB-INF/classes
#    location of servlets in the ROOT directory of your webapps folder. 
#    When you add additional web apps for homework assignments, you will 
#    add a similar statement for the new web app.
#
setenv TOM_HOME /home/ocelot/aul-user-web/apache-tomcat-5.5.17
setenv CLASSPATH {$CLASSPATH}:{$TOM_HOME}/common/lib/servlet-api.jar:
setenv CLASSPATH {$CLASSPATH}:{$HOME}/cgs4854/webapps/ROOT/WEB-INF/classes

What is .cshrc?

The .cshrc file is an initialization file for the command shell that you are using on ocelot. It is similar to an autoexec.bat file on DOS systems. By executing the above command, the above content has been added to .cshrc. This means that whenever you log on in the future, these commands will be set automatically. In particular, the CLASSPATH will be modified so that you can compile servlets, access my package, access the coreservlets package, and access servlets in your ROOT web app.

In the future, you will be modifying your CLASSPATH for each homework assignment. The modifications will be similar to the path for the ROOT web app.