--
Hi All,
I am having some trouble with JServ. I am using Apache 1.3.6, Apache JServ
1.0 on Win9x/WinNT platforms (have tried it on multiple systems). I am
using Java2 with JSDK2.0.
The problem that I am having is that I can't seem to access environment
variables. The servlet that I am writing needs to read an environment
variable in it's init method. How do I achieve this? I know that Java is
traditionally poor at accessing Environment Variables, but I noticed that
supposedly I should be able to achieve this by using the wrapper.env.copy
setting. I've tried this, but with no success. Any ideas? Code examples
would be great? I haven't been able to find too much documentation on the
matter.
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]