Hi,
In my servlet init method, I tried to open a file with that method :
getServletContext().getResource("/WEB-INF/UrlMappings.xml"). It doesn't work since the jndi protocol doesn't exist in JBOSS.
How can I read a file (such as an xml file) in the WEB-INF folder ?
Thanks a lot, I am stuck where I wasn't meant to !
Tsd
i just do it using: (in init method)
getServletConfig().getServletContext().getResourceAsStream("/WEB-INF/MyXml.xml");
this works for me using JBOSS 3.x WebLogic 6.x / 7.x and WebSphere 4.x
I use getResourceAsStream .. but i think getResource works too.
Bye