• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java & CGI

 
victor kamat
Ranch Hand
Posts: 247
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can somebody guide me to material that will help me run a Java Program thru CGI.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64615
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java as CGI? Why?
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13055
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java servlets use the conventions of CGI - Common Gateway Interface just like all other web servers.

Do you have an existing Java program that must be executed through a request to a servlet? If not, why are you posting in the Tomcat forum?

Bill
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15205
36
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic