> From: James Ravn [mailto:[EMAIL PROTECTED]
> Subject: Re: antioJarLocking not working
>
> jruby-rack makes a call to the ServletContext's getRootPath() method
No such animal; perhaps you mean getRealPath()?
> It looks like this is returning the erroneous "/temp-appname"
> which doesn't exist.
Works fine for me; after setting antiResourceLocking, the expression
getServletConfig().getServletContext().getRealPath("")
returns
C:\apache-tomcat-6.0.18\temp\2-sample
which is exactly what it's defined to do:
"Returns a String containing the real path for a given virtual path. For
example, the path '/index.html' returns the absolute file path on the server's
filesystem would be served by a request for
'http://host/contextPath/index.html', where contextPath is the context path of
this ServletContext."
Note that any usage of getRealPath() is rather suspect, since there's no
guarantee it will return anything useful; better to use getResourceAsStream()
when I/O access is needed.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you received
this in error, please contact the sender and delete the e-mail and its
attachments from all computers.
---------------------------------------------------------------------
To start a new topic, e-mail: [email protected]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]