I dont see a direct contradiction with the API docs. The example that is
given there prepends the file name with a "/", which also makes more sense
(relative to what should "test.xml" be interpreted?). The implementation of
obviously simply prepends the deployment path of the context.

-----Original Message-----
From: Jason Rowland <[EMAIL PROTECTED]>
To: Orion-Interest <[EMAIL PROTECTED]>
Date: Donnerstag, 2. November 2000 22:12
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