CGI & Java How To

Put a runnable jar file in the /var/www/cgi-bin directory.

Create a shell script like:
export PATH=/usr/java/j2re1.4.0/bin:$PATH
java -Dmethod=$REQUEST_METHOD -jar myTest.jar

might also want -Dquerystring=$QUERY_STRING - everything after the ? in the url.

Might also want to experiment with the CGI variables:
REMOTE_ADDR - IP address of the requester
REMOTE_HOST - hostname of the computer making the request
PATH_INFO - extra pathing information that might follow the request

There doesn't need to be anything special about the shell script name. It just needs to be made executable.