取出部署的应用程序名或者是当前的项目名称

http://localhost:8080/demo1/a.jsp 

${pageContext.request.contextPath}或<%=request.getContextPath()%>取出来的就是/demo1

05-11 13:28