IntelliJ IDEA的jsp中内置对象方法无法被解析的解决办法

主要原因是因为缺乏依赖

可以通过添加依赖的方式
导入servlet-api.jar,jsp-api.jar,tomcat-api.jar 这三个jar即可
这三个jar在tomcat的lib目录下有

maven管理方式可以通过添加以下依赖来解决
  1. <!--j2ee相关包 servlet、jsp、jstl-->
  2. <dependency>
  3. <groupId>javax.servlet</groupId>
  4. <artifactId>javax.servlet-api</artifactId>
  5. <version>3.1.0</version>
  6. </dependency>
  7. <dependency>
  8. <groupId>javax.servlet.jsp</groupId>
  9. <artifactId>jsp-api</artifactId>
  10. <version>2.2</version>
  11. </dependency>
  12. <dependency>
  13. <groupId>javax.servlet</groupId>
  14. <artifactId>jstl</artifactId>
  15. <version>1.2</version>
  16. </dependency>

 
 
原文地址:https://www.cnblogs.com/crowsong/p/6364694.html