RE: reading the xml file

2003-10-19 Thread James Mitchell
Take a look at the DigestingPlugin: http://www.google.com/search?hl=enie=UTF-8oe=UTF-8q=digestingpluginb tnG=Google+Search -- James Mitchell Software Engineer / Struts Evangelist http://www.struts-atlanta.org 678.910.8017 AIM:jmitchtx -Original Message- From: Jiri Chaloupka

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 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: