glassfish_at_javadesktop.org wrote:
> Thanks for correcting, Jan.
>
> But since docroot is not part of any context, it won't be possible to use
> this technique to read/write files from docroot.
>
> So, I guess the only solution is to use ClassLoader.getResourceAsStream() and then
> passing the relative path. Is that right?
>
> Thanks,
> Kedar
docroot is a context. Just so happens the context path is "" or "/".
To retrieve the file path of a resource within the docroot context (I am
assuming that is where you are running your application),
use the ServletContext.getRealPath("/index.html") method.
||
--
Regards
Gabe Wong
NGASI AppServer Manager
Application server installation and configuration AUTOMATION
http://www.ngasi.com