This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes calling cgi script Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "calling cgi script" Watch "calling cgi script" New topic

calling cgi script

Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
how to call a cgi script from a servlet?
Frank Carver

Joined: Jan 07, 1999
Posts: 6920
If you hava server which will run CGI scripts, then you can call a CGI by opening a URL to the appropriate URL which you would use to call the CGI from a browser.
To attempt to run a CGI directly from your servlet is both difficult and error prone. Java is not good at setting "environment variables" and they are a key part of the CGI specification.

Read about me at ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
I agree. Here's the link:
subject: calling cgi script
Similar Threads
PA #1.....picture association
How to make a file executable as CGI process on Apache server ?
CGI and Applets
Perl with CGI?
Applet to "send this page to a friend" feature