How to properly put JSPs in the WEB-INF folder?

前端 未结 4 1013
一生所求
一生所求 2020-12-05 05:37

My question is how to put all the JSP files in WEB-INF/JSP/ in the proper manner?

Is there any configuration for this as the structure I\'m aware of is:

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-05 06:17

    Create an intermediary JSP outside of WEB-INF that includes your JSP.

    e.g. your page inside of WEB-INF is ProjectName/WEB-INF/JSP/yourPage2.jsp create a page ProjectName/yourPage1.jsp

    Write below code in yourPage1.jsp

    yourPage1.jsp

    <%@ include file="WEB-INF/JSP/yourPage2.jsp" %>  
    

提交回复
热议问题