Orbeon Forms Setup

The Orbeon Forms documentation (see parent article's References section) explains the installation well enough. I'm going to assume you're comfortable installing a .war file into a Tomcat installation (copy the .war file to the Tomcat application's 'webapps' directory, whew). Instead I'll just say a few words about setting up Tomcat.

I'm going to assume you'd like to run Tomcat as a non-root user. So, first, of course, create that user. Make that user the owner of your Tomcat installation.

You need Java installed of course. I use Oracle's latest 1.6 JDK. Then I create a file to set up the JVM's runtime environment. I source this file from Tomcat's startup.sh and shutdown.sh scripts. I also modify these scripts so that Tomcat runs as my designated user. The environment setup file on my laptop looks like:

export JAVA_HOME=/local/apps/java
export JAVA_OPTS='-server -Xmx384M -Xms384M -XX:NewSize=64m -XX:MaxNewSize=192m -XX:SurvivorRatio=2 -XX:PermSize=128m -XX:MaxPermSize=128m -XX:+UseAdaptiveSizePolicy -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -verbose:gc -Xloggc:/var/log/tomcat/gc.log -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -Djava.awt.headless=true -Djava.net.preferIPv4Stack=true'
export CATALINA_HOME=/local/apps/tomcat
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8

I source this file in my startup and shutdown scripts. The startup.sh and shutdown.sh scripts live in Tomcat's /bin directory of course. I modify them as follows (adjust to suit your setup):


# replace this
# exec "$PRGDIR"/"$EXECUTABLE" start "$@"
su - tomcat --shell=/bin/bash -c ' \
source /local/etc/tomcat/environment.sh && \
exec /local/apps/tomcat/bin/catalina.sh start'


# replace this
# exec "$PRGDIR"/"$EXECUTABLE" stop "$@"
source /local/etc/tomcat/environment.sh && \
exec /local/apps/tomcat/bin/catalina.sh stop

You might find the wiki documentation about debug logging useful while doing development work. I did.