我也是按照视频一步步走也出现同样问题

我也是按照视频一步步走也出现同样问题

四月 21, 2019 10:49:06 上午 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet [jsp] in context with path [/maven] threw exception [The absolute uri: [http://java.sun.com/jsp/jstl/core] cannot be resolved in either web.xml or the jar files deployed with this application] with root cause
org.apache.jasper.JasperException: The absolute uri: [http://java.sun.com/jsp/jstl/core] cannot be resolved in either web.xml or the jar files deployed with this application
 at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:55)
 at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:293)
 at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:80)
 at org.apache.jasper.compiler.TagLibraryInfoImpl.generateTldResourcePath(TagLibraryInfoImpl.java:251)
 at org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:122)
 at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:431)
 at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:489)
 at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1445)
 at org.apache.jasper.compiler.Parser.parse(Parser.java:144)
 at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:244)
 at org.apache.jasper.compiler.ParserController.parse(ParserController.java:105)
 at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:202)
 at org.apache.jasper.compiler.Compiler.compile(Compiler.java:373)
 at org.apache.jasper.compiler.Compiler.compile(Compiler.java:350)
 at org.apache.jasper.compiler.Compiler.compile(Compiler.java:334)
 at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:595)
 at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:399)
 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:386)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:330)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
 at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
 at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
 at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
 at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:800)
 at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
 at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:806)
 at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)
 at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
 at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
 at java.lang.Thread.run(Unknown Source)



http://img1.sycdn.imooc.com//climg/5cbbdb8c0001248810260126.jpg


也重启了 也换了个核心

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="fmt"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
   This is maven project!
   http://img1.sycdn.imooc.com//climg/5cbbdbe20001c98906020197.jpg</body>
</html>

正在回答 回答被采纳积分+1

登陆购买课程后可参与讨论,去登陆

7回答
weixin_慕虎5578550 2019-08-04 14:47:40

错误原因:WEB-INF 下面没有uri的信息(jstl的jar包以前是放到lib中,所以没问题,现在通过maven是直接添加到Libraries中,所以解析不了uri)

http://img1.sycdn.imooc.com//climg/5d467f7a00015c4b07040337.jpg

好帮手慕阿满 2019-04-21 19:04:22

建议同学查看一下eclipse的编译级别,选择project->properties,出现如下界面,选择Java Compiler,查看自己的编译级别,

http://img1.sycdn.imooc.com//climg/5cbc4db50001a56007830331.jpg

如果不是1.8,建议同学改为1.8的版本再试试。

如果我的回答解决了你的疑惑,请采纳。祝:学习愉快~

提问者 慕盖茨8087740 2019-04-21 17:44:16
好帮手慕阿满 2019-04-21 17:19:42

同学你好,建议同学在同学problems处,查看一下报错是什么呢?如:

http://img1.sycdn.imooc.com//climg/5cbc359c0001e50e02840110.jpg

建议同学将此处的报错信息贴一下。

祝:学习愉快~

提问者 慕盖茨8087740 2019-04-21 16:02:21
提问者 慕盖茨8087740 2019-04-21 15:59:05

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.power</groupId>
  <artifactId>maven</artifactId>
  <version>1.0.0-RELEASE</version>
   <repositories>
     <repository>
     <!-- 创建私服地址 -->
     <id>aliyun</id>
     <name>aliyun</name>
     <url>https://maven.aliyun.com/repository/public</url>
     </repository>
  </repositories>
  <!-- packaging代表输出的格式 -->
  <packaging>war</packaging>
  <dependencies>
     <dependency>
     <groupId>javax.servlet</groupId>
     <artifactId>jstl</artifactId>
     <version>1.2</version>
     </dependency>
  </dependencies>
  <build>
    <finalName>maven-web</finalName>
    <plugins>
       <plugin>
           <groupId>org.apeche.maven.plugins</groupId>
           <artifactId>maven-war-plugin</artifactId>
           <version>3.2.2</version>
       </plugin>
    </plugins>
  </build>
</project>

好帮手慕阿满 2019-04-21 15:18:13

同学你好,建议同学检查一下pom文件中是否有报错,如果有报错,先解决报错。另外建议同学在项目名上点击右键,选择Maven->Update Project Configuration...再试试。

如果我的回答解决了你的疑惑,请采纳。祝:学习愉快~

  • 提问者 慕盖茨8087740 #1
    没找到pom文件中报错 但是项目上有个错误找不到在哪
    2019-04-21 16:02:59
问题已解决,确定采纳
还有疑问,暂不采纳

恭喜解决一个难题,获得1积分~

来为老师/同学的回答评分吧

0 星
请稍等 ...
意见反馈 帮助中心 APP下载
官方微信

在线咨询

领取优惠

免费试听

领取大纲

扫描二维码,添加
你的专属老师