I have a plain java class in a web application and want to read a configuration file under WEB-INF folder. I know the way to access the file if its in the class
You can get the absolute path of servlet using getRealPath() method of ServletContext and then append WEB-INF to the path you get. I think this is very basic there may be some other answers as well.