I am developing a dynamic web project j2ee web application using eclipse. I have an existing jasper report file in .jrxml format found in web-inf/jasperreports folder. How do I access these files from my java classes in the src folder. I am not even sure if context path is the right term for the root folder of the application so please enlighten me too on this part.
I am using by the way spring webflow. how do i get or initialize the object servlet context
ServletContext.getRealPathmethod can be used to get the context path.ServletContext.getRealPath("/")returns the webapp root path. Path forWEB-INF/jasperreportswould be:You can initialize you java classes from a
ServletofServletContextListenerwhere you can get reference forServletContextby respectively the inheritedgetServletContext()and theservletContextEvent.getServletContext().