Hi Tania and all:

I had the same problem: ServletContext.getRealPath() returns null in some
environments, not on my local Jrun3 but it does when run un the serviceprovider.
A bit of search on the web revealed, that Jserv has a "known bug" in the
getRealPath() implementation, so it always returns null. The advice was to
use getResource() or getResourceAsStream() instead, but as far as I can see,
these only work to open inputstreams, not for writing.

Any other ideas, how to manage local file IO with servlets? Relative paths are
no good unless you can be sure what the current path is.

Best wishes
Laurids



ELECTRIC EPHEMERIS
Laurids Pedersen

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to