This forum is not only about Tomcat, you can also ask questions about Apache HTTP server here.
Running Java programs as CGI is not a good idea. It will be really slow, because each time the webserver needs to call your Java program, it has to start up a new JVM process (which is slow) to run your Java program.
You should really use servlets instead of trying to run Java programs via CGI.
If you have an Apache HTTP server running as your web server, then you could connect Tomcat to it and run your servlets in Tomcat. [ December 12, 2007: Message edited by: Jesper Young ]