Lecture 16 Thu July 16th

[niuqin@silo ~]$ ps -ef | grep ndroot
root     21077  6712  0 11:32 ?        00:00:00 sshd: ndroot [priv]
ndroot   21121 21077  0 11:32 ?        00:00:00 sshd: ndroot@pts/50
ndroot   21122 21121  0 11:32 pts/50   00:00:00 -bash
niuqin   22699 22081  0 11:36 pts/78   00:00:00 grep ndroot
ndroot   23616     1  0 Jul15 ?        00:00:45 /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java -Djava.util.logging.config.file=/u/ndroot/apache-tomcat-7.0.35/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/u/ndroot/apache-tomcat-7.0.35/endorsed -classpath /u/ndroot/apache-tomcat-7.0.35/bin/bootstrap.jar:/u/ndroot/apache-tomcat-7.0.35/bin/tomcat-juli.jar -Dcatalina.base=/u/ndroot/apache-tomcat-7.0.35 -Dcatalina.home=/u/ndroot/apache-tomcat-7.0.35 -Djava.io.tmpdir=/u/ndroot/apache-tomcat-7.0.35/temp org.apache.catalina.startup.Bootstrap start
[niuqin@silo ~]$

My username is niuqin and I can look up anyone:

[niuqin@silo ~]$ ps -ef | grep niuqin
niuqin   19152     1  0 Jul15 ?        00:00:47 /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java -Djava.util.logging.config.file=/u/niuqin/apache-tomcat-7.0.35/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/u/niuqin/apache-tomcat-7.0.35/endorsed -classpath /u/niuqin/apache-tomcat-7.0.35/bin/bootstrap.jar:/u/niuqin/apache-tomcat-7.0.35/bin/tomcat-juli.jar -Dcatalina.base=/u/niuqin/apache-tomcat-7.0.35 -Dcatalina.home=/u/niuqin/apache-tomcat-7.0.35 -Djava.io.tmpdir=/u/niuqin/apache-tomcat-7.0.35/temp org.apache.catalina.startup.Bootstrap start
root     21920  6712  0 11:34 ?        00:00:00 sshd: niuqin [priv]
niuqin   22080 21920  0 11:34 ?        00:00:00 sshd: niuqin@pts/78
niuqin   22081 22080  0 11:34 pts/78   00:00:00 -bash
niuqin   22935 22081  3 11:37 pts/78   00:00:00 ps -ef
niuqin   22936 22081  0 11:37 pts/78   00:00:00 grep niuqin
[niuqin@silo ~]$

No surprises there. 

Let's start Grails (which I finished yesterday). 

 ( nohup grails run-app -Dserver.port=14819 --non-interactive 2>&1 > /dev/null & ) 

I need to be sure I use my port number instead of 14819. 

Besides I need to make sure

  (a) grails is active (so source .grails-setup in the installation folder)

  (b) move to the folder of the application 

  For me this is     /u/niuqin/graina2-master/ch01/qotd

I start the server and I wait. 

-----------------------------------------------(End of First Part)---------------

Now let's move on to some lecture notes used on Monday 

http://www.cs.indiana.edu/classes/c212-dgerman/spr2015/labSix.html

I go to my home page and I post a number of links, like so: 

[niuqin@silo ROOT]$ pwd
/u/niuqin/apache-tomcat-7.0.35/webapps/ROOT
[niuqin@silo ROOT]$ cat index.html
My name is Qin and I travel a lot. <p>

Here's a picture of a dog: <p>

<img src="http://vignette3.wikia.nocookie.net/hanna-barbera/images/2/24/Scoobydoo.jpg/revision/latest?cb=20090921172226"> <p>

Here are my Tomcat related assignments: <p>

<ul>
  <li> Tomcat installation (this page)
  <li> Tomcat manager-gui application (from <a href="index.jsp">this page</a>)
  <li> Java servlets (available <a href="/squash">from here</a>)
  <li> Homework Four is also available at <a href="http://silo.cs.indiana.edu:14755/qotd/quote/random">this address</a>
</ul>

[niuqin@silo ROOT]$


Now we are starting the lab assignment for the day. 

When we are done you will add a link to it in your Tomcat home page. 

And now here's how you do this lab:


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


Once you run these go into $CATALINA_HOME/webapps/iceblox and compile the applet. 

So here's what I do

[niuqin@silo ROOT]$ cd $CATALINA_HOME
[niuqin@silo apache-tomcat-7.0.35]$ cd webapps/
[niuqin@silo webapps]$ cd iceblox/
[niuqin@silo iceblox]$ ls -l
total 40
-rw------- 1 niuqin students  9719 Jul 16 12:14 iceblox.gif
-rw------- 1 niuqin students   191 Jul 16 12:14 iceblox.html
-rw------- 1 niuqin students 17927 Jul 16 12:14 Iceblox.java
drwx------ 4 niuqin students  4096 Jul 16 12:14 WEB-INF
[niuqin@silo iceblox]$ javac Iceblox.java
Picked up _JAVA_OPTIONS: -Xms512m -Xmx512m
Note: Iceblox.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
[niuqin@silo iceblox]$


And now we're done. All is well. 

I update some links in the home page: 

  <li> Here's t<a href="/iceblox/iceblox.gif">he artwork wi</a>th all Iceblox resources.
  <li> Here's t<a href="/iceblox/iceblox.html">he Iceblox g</a>ame as an applet.

Then I have to use this document:

https://www.cs.indiana.edu/classes/c212-dgerman/spr2015/labsixhelp.html

Try loading the applet just to see what happens:

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

Then please follow the instructions to activate Java in your browser. 

--