jsp ${pageContext.request.contextPath} dosent get requested

前端 未结 2 493
遥遥无期
遥遥无期 2021-01-25 06:51

Currently i have a .jsp project where my welcome page is a servlet

frontpage

The servlet sets gets two

2条回答
  •  梦毁少年i
    2021-01-25 07:40

    This is not the way to include stuff. Use jsp:include action to include the header/footer. If for some reason you really want to do it in the servlet, see this post. As long as you just grab a resource like you do, you're reading the file like any text, there is no JSP compilation/evaluation.

提交回复
热议问题