Using the Remote Server

Each student is assigned a student id, running from stu01 through stu30. I'll hand out the id's in class. If you forget (or didn't get) yours, they are listed here.

To restart the Tomcat Server, go to http://cs.calstatela.edu:81/restart.

To upload an assignment, do the following.

  1. FTP to the remote host machine cs.calstatela.edu.

  2. Log in using user name stuxx  and password csstuxx, depending on what your student id is.

    You may also telnet to this machine. Once there, you can change your password.

    A free version of the ssh telnet/ftp program is available from commerce.ssh.com.

  3. The cs.calstatela.edu machine is a linux machine. You will be connected to your /home directory.

  4. Once there follow the (symbolic) link to the tomcat directory. That symbolic link is already set up in your directory.

    This will bring you to the equivalent of TOMCAT-HOME/webapps/. Note that there is already a WEB_INF directory in your TOMCAT-HOME directory and a classes directory under it.

    Your servlets go in the classes. In general, put your JSP files at the top level.

  5. To run a servlet, e.g., HelloWorld:
    1. Put HelloWorld.class into the %TOMCAT-HOME%/WEB-INF/classes directory.
    2. Access it with a browser as: http://cs.calstatela.edu:8080/stuxx/servlet/HelloWorld.

  6. To run a JSP, e.g., BGColor.jsp:
    1. Put it anywhere under the TOMCAT-HOME directory. (Let's assume it is at the top level.)
    2. Access it with a browser as: http://cs.calstatela.edu:8080/stuxx/BGColor.jsp.

  7. Note that JSP's may be put anywhere under the TOMCAT-HOME directory. For example, if you create a sub directory and put BGColor.jsp into that directory, you would run it by accessing http://cs.calstatela.edu:8080/stuxx/sub/BGColor.jsp.

  8. When you create additional classes and packages, all the .class files must be under the WEB-INF/classes directory. You must create a directory structure in that directory that matches the package structure you are using.