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.

Anyone done anything like this before??

Perhaps my question is best suited to a Java forum ...

Thanks
Jonathan



-----Original Message-----
From: Hans Bergsten [mailto:[EMAIL PROTECTED]]
Sent: 13 April, 2000 5:53 PM
To: [EMAIL PROTECTED]
Subject: Re: How to access environment variables such as "QUERY_STRING"?


"Cogley, Jonathan" wrote:
>
> Hi,
>
> Anyone know how to access environment variables?
> such as "QUERY_STRING" WITHOUT using request.getParameter,etc
>
> There is a method System.getenv() but it is deprecated ...
> The error mentions using "use properties and -D instead"
> but how do you achieve this?

Look at the Servlet API, <http://java.sun.com/products/servlet/>.
It contains explicit methods to get all info you get through environment
variables in a GCI script. Since a JSP page is actually a servlet, you
can use the complete Servlet API in your JSP pages.

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

===========================================================================
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