1. 程式人生 > >javax.servlet.jsp.PageContext cannot be resolved to a type

javax.servlet.jsp.PageContext cannot be resolved to a type

not in cti 報錯 clas div stack contex question pen

jsp項目中報錯:


javax.servlet.jsp.PageContext cannot be resolved to a type

stack overflow上找的解決方案:

You will need to import in your project the JSP APIs, which are not included in servlet-api

In my project, the solution is

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

參考鏈接:

https://stackoverflow.com/questions/8669387/javax-servlet-jsp-pagecontext-cannot-be-resolved-to-a-type

javax.servlet.jsp.PageContext cannot be resolved to a type