I have a .war
file. And I need access to file located inside ROOT_OF_WAR/someFolder/myfile.txt
How I can access to it using ServletContextListener
?
Does ContextClassLoader#getResourceAsStream(resourceName)
point to root of web-app (i.e. root of.war
file)?
Or I need to access it using ServletContextEvent#getServletContext().getResourceAsStream("someFolder/myfile.txt");
?