#!/bin/sh # javarun # # by Jeff Schmitt # Towson University # # version 0.4 October 13, 1998 # # This is an interface which allows java cgi programs # to be run from the cgi-bin directory # Below this line should not normally require editing ########################################################## # Define user's cgi-bin directory # The back-quotes run a command and return its output CGIDIR=`pwd` #where to find java JAVA_HOME=/usr/java #where to find JDBC JDBC=/usr/faculty/schmitt/WWW/java/jdbc/lib/mm.mysql-2.0.2-bin.jar:/usr/faculty/schmitt/WWW/java/jdbc/lib/classes111.zip # Where to find classes used in your servlets CLASSPATH=$JAVA_HOME/lib/rt.jar:$CGIDIR:$JDBC # since PATH_INFO starts with a / # remove the first character PATH_INFO=${PATH_INFO#?} # Export this so the server process will find CLASSPATH export CLASSPATH # transfer execution to java exec $JAVA_HOME/bin/java -classpath $CLASSPATH \ -DREMOTE_HOST=$REMOTE_HOST \ -DQUERY_STRING=$QUERY_STRING \ -DREQUEST_METHOD=$REQUEST_METHOD \ -DCONTENT_TYPE=$CONTENT_TYPE \ -DCONTENT_LENGTH=$CONTENT_LENGTH \ -DHTTP_COOKIE=$HTTP_COOKIE \ $PATH_INFO