Nicholson Robert wrote:
> If you deploy a web app in a war file can that app access presumably via
> getResourceBundle etc. resources outside of the parent of the war file?
>
> ie. the apps root context is the root of the war file right? So that means
> that by design you cannot access resources outside of that tree correct?
>
Not necessarily ... it depends on which getResource() or
getResourceAsStream()
method you are actually calling.
If you call the methods defined on ServletContext, then you are correct
... the
resources you reference must be stored in the local web application
archive file.
On the other hand, if you call the methods of the same name from the
Class or
ClassLoader classes, you can reference resources that are co-located
with the
corresponding class files themselves, no matter how or where they were
accessed.
Craig McClanahan
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets