The WEB-INF
folder is protected by containing the settings, classes, and libraries of a Java application. It is not allowed to access any resources of this directory via URL for security reasons.
However, it is possible to do an include within the server itself, ie a JSP accessed outside the WEB-INF
folder can include a JSP from that folder.
You can also forward a response to a JSP within that folder from a servlet or controller .
And finally, you can read files from this folder using the ServletContext.getResourceAsStream()
method. Example:
servletContext.getResourceAsStream("/WEB-INF/jsp/index/index.jsp");
But usually this is done for configuration files or other static files and not for JSPs.