Search code examples
javaspringspring-mvcweb-applicationsweb-inf

JSP and other static data files location on Web Application


Continue to this question and aswers : What is WEB-INF used for in a Java web application?

Further question regarding this issue: Beside making my resource private, is there any special reason I should put my JSP files in WEB-INF? Is there any advantage to put my JSP files outside the WEB-INF? I am using Spring framework if it is related to my question.


Solution

  • Short answer: No -- there is no advantage putting the JSPs outside of the WEB-INF folder, when you use a MVC Framework like Spring-MVC. There are only disadvantages: like someone could directly invoke the JSP and could bypass all you functionally that is implemented on top of the Spring-MVC stack,.