J2EE中使用jstl报http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jarfiles错

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.(TagLibraryInfoImpl.java:122)
 at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:434)
 at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:492)
 at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1448)
 at org.apache.jasper.compiler.Parser.parse(Parser.java:145)
 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:201)
 at org.apache.jasper.compiler.Compiler.compile(Compiler.java:372)
 at org.apache.jasper.compiler.Compiler.compile(Compiler.java:349)
 at org.apache.jasper.compiler.Compiler.compile(Compiler.java:333)
 at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:600)
 at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:368)
 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
 at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
 at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:726)
 at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469)
 at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:394)
 at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:311)
 at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:168)
 at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:303)
 at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1282)
 at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1037)
 at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:980)
 at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897)
 at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
 at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
 at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
 at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
 at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
 at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:108)
 at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:522)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
 at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)
 at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:1110)
 at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
 at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:785)
 at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1425)
 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)


今天在搭建spring+springMvc+mybatis环境时出现以上错误,在网上百度了好久,有说jstl版本和tomcat版本不一致的,有说是jar包冲突的。试了好几个方法都没解决问题。最后将jsp文件中的<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>删除,问题解决。

你可能感兴趣的:(web)