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

相關文章
相關標籤/搜索