Anyone know the path + actual directory that is required in order to load a .war
resource using getResourceAsStream()?
This works with JRun 3.0 (this is the pre-war way of doing things):
InputStream is_xsl =
this.getClass().getClassLoader().getResourceAsStream("edu/ucd/guidelines/Headache.xsl");
The new API allows the following, but I keep getting a NullPointerException:
ServletContext sc = this.getServletConfig().getServletContext();
InputStream is_xml = sc.getResourceAsStream("/guidelines/Headache.xml");
I know the ServletContext is being obtained correctly as other methods in
ServletContext work fine. I figure it has to be the path format for the resource.
I have the document within the following directory structure:
/WEB-INF
/guidelines
Headache.xml
Wonder if the path name I'm using with getResourceAsStream() is not in the correct
format. Can't seem to find a mention of the right format anywhere.
I assume that others have successfully used this method with JR3.
Thanks in advance,
Mike H
------------------------------------------------------------------------------
Archives: http://www.egroups.com/group/jrun-interest/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebarRsts&bodyRsts/jrun_talk
or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the
body.