Robert Koberg at [EMAIL PROTECTED] wrote:
> (using resin 1.2.5)
> When getting the path to WEB-INF using:
>
> String APPLICATION_ROOT =
> getServletConfig().getServletContext().getRealPath("/WEB-INF");
>
> I get the following path:
>
> /Users/rkoberg/Desktop/resin/doc/WEB-INF/index_en.xml
>
> 'jimmy' is the name of the drive that has the OS X system. If I want to
> view a page in the WEB-INF directory from a browser (not through the
> webserver rather the file system) I would get the follwoing path:
>
> file:///jimmy/Users/rkoberg/Desktop/resin/doc/index_en.xml
That's because of the different way in which browsers and the Java virtual
machine see URIs (it's still some kind of a bug in the OS, IMVHO!). The
browser ususally accesses the file thru the "Carbon API" (if by browser we
think about Mozilla/IE/OmniWeb), while the virtual machine goes directly to
the underlying BSD layer... That's why of the difference (sucks, I know).
Pier (typing from OS/X :)
___________________________________________________________________________
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