--
ServletContext.getRealPath(String path) - returns null. This is a known bug
in JServ.
----- Original Message -----
From: Jason Jagatic <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 07, 1999 10:00 AM
Subject: Accessing Environment Variables / Using ServletContext
>
> The second question is similar. I was trying to use the getRealPath()
> method of ServletContext in the init method and this does not seem to work
> under JServ. My servlet executes fine under JRun, but I get a null value
> under JServ. Is this a bug with JServ? Here is my code example:
>
> public void init (ServletConfig config) throws ServletException {
> super.init(config);
> try {
> ServletContext scon = config.getServletContext();
> File TestFile = new File(scon.getRealPath("/") + "info.cfg");
> }
> catch (Exception ex)
> {out.println(ex.getMessage()); }
> }
>
> Any input would be greatly appreciated!
> Thanks,
> Jason
> [EMAIL PROTECTED]
>
>
> _______________________________________________________________
> Get Free Email and Do More On The Web. Visit http://www.msn.com
>
>
> --
> --------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> READ THE FAQ!!!! <http://java.apache.org/faq/>
> Archives and Other: <http://java.apache.org/main/mail.html/>
> Problems?: [EMAIL PROTECTED]
>
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
READ THE FAQ!!!! <http://java.apache.org/faq/>
Archives and Other: <http://java.apache.org/main/mail.html/>
Problems?: [EMAIL PROTECTED]