Yes we see this too and have since I think 1.3.8.


It compiles but does have a runtime exception, e.g. can't find  the method.
So we're doing hacks now using relative paths to figure out where we are.
Basically ever since the experimental 2.3 servlet and jsp stuff it seems to
have disappeared.  I didn't know if this was apart of the new spec or not
and they're didn't seem to be a replacement.

MD

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Jason Rowland
Sent: Thursday, November 02, 2000 1:27 PM
To: Orion-Interest
Subject: getServletContext().getRealPath() bug?


Can someone tell me if this is correct behavior or if this is a bug?

In the init method of my servlet, I have the following line of code:

System.out.println(config.getServletContext().getRealPath("test.xml"));

The result I get is this:
c:\projects\leadsdb\deploy\webtest.xml

The root of the web site is c:\projects\leadsdb\deploy\web

It seems to me that getRealPath should return:
c:\projects\leadsdb\deploy\web\test.xml

Is this a bug?  Could someone either confirm or deny this bug for me?



Reply via email to