Pascal Houde wrote:

> What is strange is that if I do getRealPath("/includes/sometext.txt") it is
> translating it to "/my_webserver_root/htdocs/includes/sometext.txt" which is
> good and that's what getResource does behind the scenes before fetching the
> file... right? The file really exist but getResource returns null.
>

I don't use JRun, but I would not necessarily assume that the same base name is
used for both getRealPath() and getResource().  You need to check the JRun docs
for how the base location of getResource() is configured for a particular
servlet context.

>
> I tried that test with the JRUN web server and the Netscape server but in
> both case it's unsuccessful. I tried different web servers since the
> getResource call the web server to locate the file. I don't think it's a
> problem with the API since it works for you so I guess that JRUN
> misimplements it. Does anybody was able to make it work with JRUN?
>

You're probably best off asking this on one of the JRun support mailing lists.

>
> Pascal
>

Craig

___________________________________________________________________________
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