1. Install IceBlox

  mkdir $CATALINA_HOME/webapps/iceblox
  mkdir $CATALINA_HOME/webapps/iceblox/WEB-INF
  mkdir $CATALINA_HOME/webapps/iceblox/WEB-INF/classes
  mkdir $CATALINA_HOME/webapps/iceblox/WEB-INF/lib
  cp /l/www/classes/c212/fall2010/notes/iceblox/Iceblox.java $CATALINA_HOME/webapps/iceblox
  cp /l/www/classes/c212/fall2010/notes/iceblox/iceblox.gif  $CATALINA_HOME/webapps/iceblox
  cp /l/www/classes/c212/fall2010/notes/iceblox/iceblox.html $CATALINA_HOME/webapps/iceblox

  Running these commands will have this effect:

  [eboland@silo webapps]$ du -a iceblox/
  4       iceblox/iceblox.html
  20      iceblox/Iceblox.java
  12      iceblox/iceblox.gif
  4       iceblox/WEB-INF/classes
  4       iceblox/WEB-INF/lib
  12      iceblox/WEB-INF
  52      iceblox/
  [eboland@silo webapps]$ pwd
  /u/eboland/apache-tomcat-5.5.17/webapps
  [eboland@silo webapps]$

  How do we check? 

  Answer: 

    http://silo.cs.indiana.edu:11146/iceblox/iceblox.html

  For this to run we need to compile the Iceblox.java file

  So let's go to $CATALINA_HOME/webapps/iceblox and compile it first. 

2. Install Chat

  mkdir $CATALINA_HOME/webapps/chat
  mkdir $CATALINA_HOME/webapps/chat/WEB-INF
  mkdir $CATALINA_HOME/webapps/chat/WEB-INF/classes
  mkdir $CATALINA_HOME/webapps/chat/WEB-INF/lib

  cp /l/www/classes/c212/fall2012/chat/Chat.java        $CATALINA_HOME/webapps/chat/WEB-INF/classes
  cp /l/www/classes/c212/fall2012/chat/ChatServlet.java $CATALINA_HOME/webapps/chat/WEB-INF/classes
  cp /l/www/classes/c212/fall2012/chat/web.xml          $CATALINA_HOME/webapps/chat/WEB-INF
  cp /l/www/classes/c212/fall2012/chat/ChatApplet.java  $CATALINA_HOME/webapps/chat
  cp /l/www/classes/c212/fall2012/chat/HttpMessage.java $CATALINA_HOME/webapps/chat

Now go to this context (cd $CATALINA_HOME/webapps/chat) and make three changes:

  (a) modify lines 55 and 66 in ChatApplet.java, put your port number, save, compile
  (b) move to WEB-INF/classes and change line 36 in Chat.java, put your port number, save, compile 

Test it with: 

  http://silo.cs.indiana.edu:11146/chat/servlet/Chat

See how it goes. 

3. Servlet Experiment 

Go to the lab page for this week: 

  http://www.cs.indiana.edu/classes/c212-dgerman/fall2012/labNine.html

Create a squash context in WEB-INF with the files that you see there, linked. 

--