Try getResource("/WEB-INF/myresource.xml");
-- Jeff
kjc wrote:
I have an ActionServlet that subclasses the struts action servlet. In my init() method i'm trying to load a resource
like this.
public void init(){
URL url = this.getServletContext().getResource("/myresource.xml");
logger.info("the config resource was " + (url != null ? "found" : "not found"));
}
The "not found" statement is printed.
I checked my .war file and the resource is properly placed under WEB-INF/myresource.xml
Note, that this war file is part of a .ear file.
Thanks in advance.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]