Setting up JabberHTTPServlets

Philosophy

My current solution is Java, Apache, Tomcat with XSL in the wings.

Assumptions

Apache directory structure :: make these directories

APACHE_HOME=/home/httpd/html

$APACHE_HOME/jabberhttpservlets

$APACHE_HOME/jabberhttpservlets/css

$APACHE_HOME/jabberhttpservlets/html

$APACHE_HOME/jabberhttpservlets/images

Tomcat directory structure :: make these directories

TOMCAT_HOME=/usr/local/jakarta-tomcat

$TOMCAT_HOME/webapps

$TOMCAT_HOME/webapps/jabberhttpservlets

$TOMCAT_HOME/webapps/jabberhttpservlets/css

$TOMCAT_HOME/webapps/jabberhttpservlets/html

$TOMCAT_HOME/webapps/jabberhttpservlets/conf

$TOMCAT_HOME/webapps/jabberhttpservlets/images

$TOMCAT_HOME/webapps/jabberhttpservlets/WEB-INF

JABBERCLASSES=/usr/local/jakarta-tomcat/webapps/jabberhttpservlets/WEB-INF/classes

$JABBERCLASSES/org

$JABBERCLASSES/org/jabber

$JABBERCLASSES/org/jabber/servletcomm

$JABBERCLASSES/org/jabber/httpservlets

css file :: Cascading Style Sheet

$APACHE_HOME/jabberhttpservlets/css/jabberhttpservlets.css

make a link in :: $TOMCAT_HOME/webapps/jabberhttpservlets/html

ln -s $APACHE_HOME/jabberhttpservlets/css/jabberhttpservlets.css jabberhttpservlets.css

servlet html files

Note :: you will probably replace the references to localhost with your hostname.

$APACHE_HOME/jabberhttpservlets/html/registeruser.html

make a link in :: $TOMCAT_HOME/webapps/jabberhttpservlets/html

ln -s $APACHE_HOME/jabberhttpservlets/html/registeruser.html registeruser.html

applet jar files

Note :: make a link to the applet jar file, or the reload will not work

$APACHE_HOME/jabberapplet/JabberApplet.jar

make a link in :: $TOMCAT_HOME/webapps/jabberhttpservlets/html

ln -s $APACHE_HOME/jabberapplet/JabberApplet.jar JabberApplet.jar

applet html files

$APACHE_HOME/jabberapplet/applet.htm

make a link in :: $TOMCAT_HOME/webapps/jabberhttpservlets/html

ln -s $APACHE_HOME/jabberapplet/applet.htm applet.htm

Environment variables

export TOMCAT_HOME=/usr/local/jakarta-tomcat

export JAVA_HOME=/usr/local/jdk1.2.2

export CLASSPATH=.:$TOMCAT_HOME/lib/servlet.jar

Suggested project directories :: make these directories

Note :: ~ = your home directory

~/projects

~/projects/jabberhttpservlets

Note :: Java src code

~/projects/jabberhttpservlets/java

Note :: the following directories support the package structure, I use these to stash the class files

~/projects/jabberhttpservlets/java/org

~/projects/jabberhttpservlets/java/org/jabber

~/projects/jabberhttpservlets/java/org/jabber/servletcomm

~/projects/jabberhttpservlets/java/org/jabber/httpservlets

Note :: create the following to store javadocs

~/projects/jabberhttpservlets/javadocs

Shell scripts

Note :: the shell scripts can live with the Java, or elsewhere if you change your PATH

bldall :: builds servletcomm and httpservlets

cp2tomcat :: copies class files up to tomcat

Note :: you may want to change cp to sudo cp

jabberservlets.config :: jabberhttpservlet creature

Note :: if this file exists, and the servlet enables reading it, you can override various parameters without recompiling

$TOMCAT_HOME/webapps/jabberhttpservlets/conf/jabberhttpservlets.config

Config.java

Edit this file and compile project to create your default values

Tomcat configuration

$TOMCAT_HOME/webapps/jabberhttpservlets/WEB-INF/web.xml

$TOMCAT_HOME/conf/tomcat.conf

$TOMCAT_HOME/conf/server.xml