"Cogley, Jonathan" wrote:
>
> Hans,
>
> I am actually trying to access them from a Java Console app compiled
> to an .exe and run as a CGI in IIS. - Dont ask why?! :)
> (servlets or JSP are not an option for us right now ... but will be in the
> future!!)
>
> I think that I may need to read the System.in and parse it in a similar
> way to a Perl program does ... however I think I still need CONTENT_LENGTH
> in
> order to do the read successfully.

In that case, the only solution I can think of is to use a wrapper script
that calls your Java CGI program. This script (or bat file, or whatever)
need to get all environment variables and pass them to the Java program,
e.g. as regular command line arguments or as -D flags (so they end up
as System properties where the app can get them).

I'm sure you're already aware of the fact that running Java applications
as CGI is extremely inefficient. A new JVM must be started for each
request, and a JVM is a large process that takes time to initialize.

Hans
--
Hans Bergsten           [EMAIL PROTECTED]
Gefion Software         http://www.gefionsoftware.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to