${pageContext.request.contextPath} 在Jsp页面报错
时间:2020-09-18 00:51:42
收藏:0
阅读:56
1、错误:
${pageContext.request.contextPath} 在Jsp页面报错
2、解决办法
将jsp-api.jar 和 servlet-api.jar 一起添加到项目中,这两个jar包在tomcat的lib文件夹下可找到
<!-- servlet 相关api,因为servlet容器中包含此包, --> <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <version>3.1.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>javax.servlet.jsp</groupId> <artifactId>jsp-api</artifactId> <version>2.1</version> <scope>provided</scope> </dependency>
评论(0)