无法在web.xml或使用此应用程序部署的jar文件中解析绝对uri:[http://www.springframework.org/security/tags]

使用idea开发,maven创建ssm项目,项目可以正常启动,但访问有使用了security的jsp页面时就会报异常:
无法在web.xml或使用此应用程序部署的jar文件中解析绝对uri:[http://www.springframework.org/security/tags]

已经添加 spring-security-taglibs 依赖l
tomcat 版本 9.0.22
spring 版本 5.0.15
spring security 版本 5.0.13
JDK8

pom.xml




  4.0.0

  com.wct.demo
  spring-security-demo
  1.0-SNAPSHOT
  war

  spring-security Maven Webapp

  
    UTF-8
    1.8
    1.8
  

  

    
    
      org.springframework.security
      spring-security-core
    
    
      org.springframework.security
      spring-security-web
    
    
      org.springframework.security
      spring-security-config
    
    
      org.springframework.security
      spring-security-taglibs
    

    
    
      org.springframework
      spring-webmvc
    

    
      tk.mybatis
      mapper
      4.1.5
    

    
    
      org.mybatis
      mybatis
      3.4.0
    
    
      org.mybatis
      mybatis-spring
      1.3.0
    

    
    
      com.alibaba
      druid
      1.0.20
    

    
    
      mysql
      mysql-connector-java
      5.1.30
    

    
    
      org.projectlombok
      lombok
      1.16.12
    

    
    
      com.fasterxml.jackson.core
      jackson-databind
      2.9.5
    

    
    
      com.fasterxml.jackson.datatype
      jackson-datatype-guava
      2.5.3
    
    
    
      org.codehaus.jackson
      jackson-core-asl
      1.9.13
    
    
      org.codehaus.jackson
      jackson-mapper-asl
      1.9.13
    
    
    
      ch.qos.logback
      logback-core
      1.1.8
    
    
      ch.qos.logback
      logback-classic
      1.1.8
    
    
      org.slf4j
      slf4j-api
      1.7.21
    

    
    
      org.apache.tomcat
      jsp-api
      6.0.36
    


    
      org.springframework.security
      spring-security-test
      test
    
  

  
    
      
        org.springframework
        spring-framework-bom
        5.0.15.RELEASE
        pom
        import
      
      
        org.springframework.security
        spring-security-bom
        5.0.13.RELEASE
        pom
        import
      
    
  

  
    spring-security-demo
    
      
        src/main/resources
      
    
  


图片
无法在web.xml或使用此应用程序部署的jar文件中解析绝对uri:[http://www.springframework.org/security/tags]_第1张图片
乱码为:无法在web.xml或使用此应用程序部署的jar文件中解析绝对uri:[http://www.springframework.org/security/tags]
异常日志:

04-Feb-2020 13:41:44.775 ��Ϣ [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.ApplicationContext.log No Spring WebApplicationInitializer types detected on classpath
04-Feb-2020 13:41:45.048 ��Ϣ [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.ApplicationContext.log Initializing Spring root WebApplicationContext
04-Feb-2020 13:41:49.050 ��Ϣ [http-nio-9090-exec-2] org.apache.catalina.core.ApplicationContext.log Initializing Spring FrameworkServlet 'spring'
04-Feb-2020 13:42:01.222 ���� [http-nio-9090-exec-8] org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for servlet [jsp] in context with path [/springSecurity] threw exception [�޷���web.xml��ʹ�ô�Ӧ�ó������jar�ļ��н�������uri��[http://www.springframework.org/security/tags]] with root cause
	org.apache.jasper.JasperException: �޷���web.xml��ʹ�ô�Ӧ�ó������jar�ļ��н�������uri��[http://www.springframework.org/security/tags]
		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.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: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:206)
		at org.apache.jasper.compiler.Compiler.compile(Compiler.java:385)
		at org.apache.jasper.compiler.Compiler.compile(Compiler.java:362)
		at org.apache.jasper.compiler.Compiler.compile(Compiler.java:346)
		at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:603)
		at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:399)
		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:741)
		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:53)
		at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
		at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
		at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:320)
		at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)
		at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)
		at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
		at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:119)
		at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
		at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)
		at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
		at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)
		at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
		at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170)
		at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
		at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
		at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
		at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilterInternal(BasicAuthenticationFilter.java:158)
		at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
		at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
		at org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter.doFilter(DefaultLoginPageGeneratingFilter.java:206)
		at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
		at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:200)
		at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
		at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116)
		at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
		at org.springframework.security.web.csrf.CsrfFilter.doFilterInternal(CsrfFilter.java:100)
		at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
		at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
		at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:74)
		at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
		at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
		at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)
		at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
		at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
		at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)
		at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
		at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:215)
		at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178)
		at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357)
		at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270)
		at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
		at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
		at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)
		at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
		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:202)
		at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
		at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
		at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
		at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
		at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678)
		at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
		at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
		at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
		at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
		at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:853)
		at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1587)
		at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
		at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
		at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
		at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
		at java.lang.Thread.run(Thread.java:748)
04-Feb-2020 13:42:01.231 ���� [http-nio-9090-exec-8] org.apache.catalina.core.ApplicationDispatcher.invoke Servlet.service() for servlet [jsp] threw exception
	org.apache.jasper.JasperException: �޷���web.xml��ʹ�ô�Ӧ�ó������jar�ļ��н�������uri��[http://www.springframework.org/security/tags]
		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.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: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:206)
		at org.apache.jasper.compiler.Compiler.compile(Compiler.java:385)
		at org.apache.jasper.compiler.Compiler.compile(Compiler.java:362)
		at org.apache.jasper.compiler.Compiler.compile(Compiler.java:346)
		at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:603)
		at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:399)
		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:741)
		at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
		at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
		at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:712)
		at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:461)
		at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:384)
		at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
		at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:394)
		at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:253)
		at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:348)
		at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:173)
		at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
		at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678)
		at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
		at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
		at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
		at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
		at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:853)
		at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1587)
		at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
		at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
		at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
		at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
		at java.lang.Thread.run(Thread.java:748)
04-Feb-2020 13:42:01.232 ���� [http-nio-9090-exec-8] org.apache.catalina.core.StandardHostValve.custom Exception Processing ErrorPage[errorCode=500, location=/500.jsp]
	org.apache.jasper.JasperException: �޷���web.xml��ʹ�ô�Ӧ�ó������jar�ļ��н�������uri��[http://www.springframework.org/security/tags]
		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.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: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:206)
		at org.apache.jasper.compiler.Compiler.compile(Compiler.java:385)
		at org.apache.jasper.compiler.Compiler.compile(Compiler.java:362)
		at org.apache.jasper.compiler.Compiler.compile(Compiler.java:346)
		at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:603)
		at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:399)
		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:741)
		at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
		at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
		at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:712)
		at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:461)
		at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:384)
		at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
		at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:394)
		at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:253)
		at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:348)
		at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:173)
		at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
		at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678)
		at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
		at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
		at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
		at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
		at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:853)
		at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1587)
		at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
		at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
		at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
		at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
		at java.lang.Thread.run(Thread.java:748)

login.jsp

<%--
  Created by IntelliJ IDEA.
  User: WEI
  Date: 2020/2/10
  Time: 14:50
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>



  
  
  Sign in

  
  

  
  
  
  
  

  
  
  










**

解决办法:

更改tomcat版本,经实验,tomcat版本修改为8.5.50,7.0.99没有报异常,其他tomcat9的版本没有实验

**

你可能感兴趣的:(Spring)