Kousik Majumder wrote:Then what is the use of putting the jsp files under WEB-INF if I can not use it ?
In a properly structured modern web application, JSPs should never be directly addressed. Rather, their page controller
servlets are accessed and the the JSP is forwarded to. Putting the JSPs under WEB-INF guarantees that they will never be directly addressed.
If you are not following best practices and addressing JSPs directly, then they cannot go under WEB-INF.
See
this article for information on web application structure best practices.
Even if it has to access some image files it has to go through WEB-INF which will not work.
Incorrect. Image files and other client-addressable resources do not get placed with the JSPs under WEB-INF.
Please give a scenario where I should put my jsp under WEB-INF.
When you follow best practices.