If ur webapp is a .war file use the following in ur servlet code
InputStream is = getClass().getResourceAsStream("/WEB-INF/abc.xml")
Document doc = db.parse(is) ;
---------------
Originally posted by shaju joseph:
I am trying to parse a XML file from /WEB-INF directory. I want to do it from a bean class which is instantiated in a servlet. What path I should give to parse this file ?
Document doc = db.parse("/abc.xml") or
Document doc = db.parse("/WEB-INF/abc.xml") ?
Thanks for the help
Shaju