Stephane Bailliez <[EMAIL PROTECTED]> writes:

>I had the painful pleasure this afternoon to install iPlanet to qualify our
>turbine-based webapp. I ran a into a problem encountered a couple of times
>judging by a 'iplanet' search in the archives of turbine-user and
>scarab-dev.

[... getting null from ServletContext.getRealPath("") ...]

Hi,

>This is due to ServletConfig.getRealPath("") returning null... thus it fails
>loading the properties file during initialization of the primary services,
>etc etc etc...

This is correct and legal, according to Sun specs:

--- cut ---
getRealPath

public java.lang.String getRealPath(java.lang.String path)

    Returns a String containing the real path for a given virtual
path. For example, the virtual path "/index.html" has a real path of
whatever file on the server's filesystem would be served by a request
for "/index.html".

    The real path returned will be in a form appropriate to the
computer and operating system on which the servlet container is
running, including the proper path separators. This method returns
null if the servlet container cannot translate the virtual path to a
real path for any reason (such as when the content is being made
available from a .war archive).

Parameters: path - a String specifying a virtual path
Returns: a String specifying the real path, or null if the translation
cannot be performed
--- cut ---


>It's not clear by the servlet api if an empty path might be considered valid
>or not. My interpretation is yes..but iPlanet works fine by using
>getRealPath(".") as it simply has the precondition in getRealPath(String)
>made of:

>if (path == null || path.length() == 0) return null;

>I think it might be better to change the empty path to a more valid ".". It

"." is not the same as "". I'd say that "/" is the same as "".

There are some places in Turbine where context.getRealPath("/"); is
already used.

In Turbine-2, I found one reference to "" in TurbineLoggingService and
two in Turbine.java. Shall we change them?

        Regards
                henning

-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen       -- Geschaeftsfuehrer
INTERMETA - Gesellschaft fuer Mehrwertdienste mbH     [EMAIL PROTECTED]

Am Schwabachgrund 22  Fon.: 09131 / 50654-0   [EMAIL PROTECTED]
D-91054 Buckenhof     Fax.: 09131 / 50654-20   

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to