Re: reading the xml file

2003-10-19 Thread Larry Meadors
Doing it the way you describe will only work from a servlet. If that is ok, stop reading and do it that way. :-) A more general way would be to use a classloader instead. There are many good articles on how to do this (google for 'classloader resource'), but one simple way is this: InputStream

Re: reading the xml file

2003-10-19 Thread Craig R. McClanahan
Jiri Chaloupka wrote: Hallo, I thinkin how I can read the xml file from /WEB-INF directory. I found something as InputStream is = servletContext.getResourceAsStream("/WEB-INF/something.xml") but how I can get servletContext?. From inside an Action, you can call getServlet().getServletContext().

RE: reading the xml file

2003-10-19 Thread James Mitchell
; From: Jiri Chaloupka [mailto:[EMAIL PROTECTED] > Sent: Sunday, October 19, 2003 12:23 PM > To: [EMAIL PROTECTED] > Subject: reading the xml file > > > Hallo, > I thinkin how I can read the xml file from /WEB-INF directory. > > I found something as > InputStream

reading the xml file

2003-10-19 Thread Jiri Chaloupka
Hallo, I thinkin how I can read the xml file from /WEB-INF directory. I found something as InputStream is = servletContext.getResourceAsStream("/WEB-INF/something.xml") but how I can get servletContext?. Or, is t good way to read data, as datasource names, from xml file and store it as instance