${pageContext.request.contextPath}的作用是在jsp页面里 取出绝对路径
例如:http://localhost:8080/demo1/a.jsp
此时的${pageContext.request.contextPath}就代表着/demo1 就是/加上项目名称
而"/"代表的含义就是http://localhost:8080
故有时候项目中这样写${pageContext.request.contextPath}/a.jsp
${pageContext.request.contextPath}的作用是在jsp页面里 取出绝对路径
例如:http://localhost:8080/demo1/a.jsp
此时的${pageContext.request.contextPath}就代表着/demo1 就是/加上项目名称
而"/"代表的含义就是http://localhost:8080
故有时候项目中这样写${pageContext.request.contextPath}/a.jsp