jsp文件中写${pageContext.request.contextPath}报错:javax.servlet.jsp cannot be resolved to a type

添加以下依赖便可:java

<dependency>
    <groupId>javax.servlet</groupId>
    <artifactId>jsp-api</artifactId>
    <version>2.0</version>
    <scope>provided</scope>
</dependency>

参考博客:http://jtuts.com/2016/03/04/javax-servlet-jsp-cannot-resolved-type/api

相关文章
相关标签/搜索