For example, you may select broad.cse.sc.edu
There are a few ways to do it
With ls command, you can find out how many subdirectories have already been created under /work
With df -k command,you can find out disk space that machine has under /work
For example, when using df -k on broad.cse.sc.edu, one line of the output is:
/dev/dsk/c0t0d0s5 15110050 9 14958941 1% /work
It means this machine has 14958941k byte spare space.
If there are a lot of subdirectories under /work or the spare space is not big enough ( 100M may be needed), you may need to think about selecting another machine.
Once selected a machine, write down its name. You need to login that machine every time when you want to use Tomcat.
If you could not create your own directory there, please select another machine.
This will make sure other students could not get into your directory.
Example: 15634 for student with SSN: xxx-xx-5643
You should find a line like <Connector port="8080" change it to be <Connector port="15643"
This is done by removing line <!-- and --> before and after it.
In this versions of Tomcat 5, the commented out entry distributed with Apache Tomcat is in error: it is missing the trailing slash (i.e., <Context ... debug="0" > instead of the proper <Context ... debug="0" /> ). So, you will need to insert the slash.
<DefaultContext reloadable="true"/>
This entry should be put just below the following comment:
<!-- Define properties for each web application...
-->
Note that the filename is web.xml, not server.xml
<servlet>
<servlet-name>invoker</servlet-name>
<servlet-class>
org.apache.catalina.servlets.InvokerServlet
</servlet-class>
...
</servlet>
<servlet-mapping>
<servlet-name>invoker</servlet-name>
<url-pattern>/servlet/*</url-pattern>
</servlet-mapping>
<user username="manager" password="<passwd>" roles="manager"/>
<user username="admin" password="<passwd>" roles="admin"/>
Here, <passwd> is the password you select for management.
These two lines should be put just before </tomcat-users>
*This step is shell dependent
setenv CATALINA_HOME /work/<userid>/jakarta-tomcat-5.0.16
setenv JAVA_HOME /usr/local/java1.4
export CATALINA_HOME=/work/<userid>/jakarta-tomcat-5.0.16
export JAVA_HOME=/usr/local/java1.4
Using command echo $CATALINA_HOME and echo $JAVA_HOME command do figure out what kind of shell you are using.
To avoid input these environment variables setting commands every time, you can put them in n/acct/s1/<userid>/SUN/.cshrc for csh or /acct/s1/<userid>/SUN/.bashrc for bash.
You can use echo $SHELL or ps command to figure out what kind of shell you are using.
If you get information like:
The JAVA_HOME environment variable is not defined correctly This environment variable is needed to run this program
Using command whereis java for a java install directory, for example /usr/local/java1.4.1,
and reset JAVA_HOME environment variable
Example: http://broad.cse.sc.edu:15643/
You should get the Tomcat management home page.
Viewable on campus only, Connect to COEIT VPN Server for workaround for access from home.
Be careful that your browser does not try to change the file extension, yielding Hello.htm instead of Hello.html
You can add /work/<userid>/jakarta-tomcat-5.0.16/bin to PATH in your .cshrc (or .bashrc) file. Then you can use command startup.sh to startup and shutdown.sh to shutdown Tomcat server anywhere.
Click Here
cd //This command make sure current directory is /acct/s1/<userid>/SUN/
mkdir csce590n
ln -s /work/<userid>/jakarta-tomcat-5.0.16/webapps/ROOT/WEB-INF/classes /acct/s1/<userid>/SUN/csce590n/dev
The last command constructs a symbol link. I recommend you use it. You can also use mkdir csce590n/dev instead, but that means you need to copy your programs to your publish directory /work/<userid>/jakarta-tomcat-5.0.16/webapps/ROOT/WEB-INF/classes everytime.
setenv CLASSPATH=.:/acct/s1/<userid>/SUN/csce590n/dev:/work/<userid>/jakarta-tomcat-5.0.16/common/lib/servlet-api.jar:/work/<userid>/jakarta-tomcat-5.0.16/common/lib/jsp-api.jar
export CLASSPATH=.:/acct/s1/<userid>/SUN/csce590n/dev:/work/<userid>/jakarta-tomcat-5.0.16/common/lib/servlet-api.jar:/work/<userid>/jakarta-tomcat-5.0.16/common/lib/jsp-api.jar
To avoid input these commands every time, you can put them in /acct/s1/<userid>/SUN/ .cshrc for csh or /acct/s1/<userid>/SUN/.bashrc for bash
If you get compilation errors, go back and check your CLASSPATH settings. You most likely erred in listing the location of the JAR file that contains the servlet classes.
You need to copy the .class file to /acct/s1/<userid>/web/WEB-INF/classes/ first if you do not use symbol link.
here, you need to create subdirectory coreservlets yourself.
If you want to download and install Tomcat on your own computer, please check here for help.
*For csce590n Spring 2004 students only:
If you still have problem with installation and configuration, please send an email to huang6@cse.sc.edu
Last modified:Tue Jan 27 6:38:45 EST 2004