Thanks for your help!  I did see the API documentation on how the client side
variables are accessed through the method calls, I guess I should have been more
specific; would you know how to access those server variables, set by apache?

Thanks again,
RMY

-------------------------
Richard M. Yumul
mailto:[EMAIL PROTECTED]
DTAI Incorporated
http://www.dtai.com
(619)542-1700 · fax:(619)542-8675

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Craig R.
McClanahan
Sent: Tuesday, April 20, 1999 4:09 PM
To: Java Apache Users
Subject: Re: Environment Variable?


Richard Yumul wrote:

> Can somebody please tell me how to access the server enviroment variables?
For
> example, how do you access variables like DOCUMENT_ROOT, etc.?
>
> Thanks,
> Rich Yumul
>

Most of the "interesting" CGI-related environment variables are directly
translated into methods in the HttpServletRequest.  For example, the
PATH_INFO value is returned by getPathInfo(), PATH_TRANSLATED by
getPathTranslated(), and so on.  The details are in the Javadoc API descriptions
of each method.

The particular case of DOCUMENT_ROOT is interesting, because it is an Apache
extension, not a standard CGI variable (and thus it is not visible through the
standard servlet API).  Apache JServ does know about this value, however, and
uses
it as the basis for paths calculated by the getRealPath() call.

Craig McClanahan

PS:  I am about to add this question and answer to the FAQ-O-MATIC at
http://java.apache.org -- a very useful place to look up answers to previously
asked questions.





----------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html/>
Problems?:           [EMAIL PROTECTED]




----------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html/>
Problems?:           [EMAIL PROTECTED]

Reply via email to