JSTL报错at org.apache.jasper.compiler.DefaultErrorHandler.jspError

一、问题描述

启动Tomcat9,然后访问jsp页面,出现如下

14-Dec-2020 10:20:40.983 涓ラ噸 [http-nio-8080-exec-4] org.apache.catalina.core.StandardWrapperValve.invoke 鍦ㄨ矾寰勪负鐨勪笂涓嬫枃涓紝Servlet[jsp]鐨凷ervlet.service锛堬級寮曞彂浜嗗叿鏈夋牴鏈師鍥犵殑寮傚父鏃犳硶鍦╳eb.xml鎴栦娇鐢ㄦ搴旂敤绋嬪簭閮ㄧ讲鐨刯ar鏂囦欢涓В鏋愮粷瀵箄ri锛歔http://java.sun.com/jsp/jstl/core]
org.apache.jasper.JasperException: 鏃犳硶鍦╳eb.xml鎴栦娇鐢ㄦ搴旂敤绋嬪簭閮ㄧ讲鐨刯ar鏂囦欢涓В鏋愮粷瀵箄ri锛歔http://java.sun.com/jsp/jstl/core]
at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:55)
   at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:294)
   at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:81)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
   at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:690)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
   at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:374)
   at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
   at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:880)
   at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1601)
   at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
   at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
   at java.lang.Thread.run(Thread.java:748)
二、解决方法

这个问题出现的原因就是没有引用JSTL和Standard的jar包所引起的,在项目中,导入;

<!-- https://mvnrepository.com/artifact/javax.servlet.jsp.jstl/jstl-api -->
<!--JSTL表达式的依赖-->
<dependency>
   <groupId>javax.servlet.jsp.jstl</groupId>
   <artifactId>jstl-api</artifactId>
   <version>1.2</version>
</dependency>

<!-- https://mvnrepository.com/artifact/taglibs/standard -->
<!--standard标签库-->
<dependency>
   <groupId>taglibs</groupId>
   <artifactId>standard</artifactId>
   <version>1.1.2</version>
</dependency>

还有就是检查一下Tocat中的有没有如下文件,若没有导入即可

 

 

 

 

posted @ 2020-12-14 10:44  苏六来了✨  阅读(1492)  评论(0编辑  收藏  举报