使用spring security的access-denied-page,结果报了个很凶的错误!贴出来给大家看看

问题描述

望各位高手们,给俺讲讲,这是为啥?HTTPStatus500-typeExceptionreportmessagedescriptionTheserverencounteredaninternalerror()thatpreventeditfromfulfillingthisrequest.exceptionorg.apache.jasper.JasperException:TheStrutsdispatchercannotbefound.ThisisusuallycausedbyusingStrutstagswithouttheassociatedfilter.Strutstagsareonlyusablewhentherequesthaspassedthroughitsservletfilter,whichinitializestheStrutsdispatcherneededforthistag.-[unknownlocation]org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:532)org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:455)org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:391)org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)javax.servlet.http.HttpServlet.service(HttpServlet.java:722)org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:394)org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:99)org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)org.springframework.security.ui.SessionFixationProtectionFilter.doFilterHttp(SessionFixationProtectionFilter.java:52)org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)org.springframework.security.providers.anonymous.AnonymousProcessingFilter.doFilterHttp(AnonymousProcessingFilter.java:105)org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)org.springframework.security.ui.rememberme.RememberMeProcessingFilter.doFilterHttp(RememberMeProcessingFilter.java:116)org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter.doFilterHttp(SecurityContextHolderAwareRequestFilter.java:91)org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)org.springframework.security.ui.basicauth.BasicProcessingFilter.doFilterHttp(BasicProcessingFilter.java:174)org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:278)org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.java:89)org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:192)org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:185)org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:236)org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)org.springframework.security.ui.AccessDeniedHandlerImpl.handle(AccessDeniedHandlerImpl.java:65)org.springframework.security.ui.ExceptionTranslationFilter.handleException(ExceptionTranslationFilter.java:171)org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:117)org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)org.springframework.security.providers.anonymous.AnonymousProcessingFilter.doFilterHttp(AnonymousProcessingFilter.java:105)org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)org.springframework.security.ui.rememberme.RememberMeProcessingFilter.doFilterHttp(RememberMeProcessingFilter.java:116)org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter.doFilterHttp(SecurityContextHolderAwareRequestFilter.java:91)org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)org.springframework.security.ui.basicauth.BasicProcessingFilter.doFilterHttp(BasicProcessingFilter.java:174)org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:278)org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.java:89)org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235)org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:185)org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:236)org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)

解决方案

解决方案二:
该回复于2011-02-09 08:58:42被版主删除
解决方案三:
引用1楼smalldear的回复:

帮顶下

谢谢,这又是一个版本不兼容的问题,现在解决了
解决方案四:
版本问题哈。。。。
解决方案五:
解决了就好!

时间: 2024-09-23 11:49:29

使用spring security的access-denied-page,结果报了个很凶的错误!贴出来给大家看看的相关文章

解决:java.security.AccessControlException: Access Denied Error

在R12.2.0升级到R12.2.2完成后,出现了一个错误,在打开form界面时候,发现forms页面只出现边框,没有任何职责显示: 刚开始感觉应该是重启oacore就好了,因为在R12.2.2中oacore是由weblogic管理的,所以,决定重启weblogic,重启之后,发现问题依旧存在. 然后,根据同事建议: 用sysadmin登录>功能管理员> 清除所有高速缓存. 但是还是不行.. 然后,在java控制台发现有java程序运行的报错: java.security.AccessCont

What is the best way to handle Invalid CSRF token found in the request when session times out in Spring security

18.5.1 Timeouts One issue is that the expected CSRF token is stored in the HttpSession, so as soon as the HttpSession expires your configured AccessDeniedHandler will receive a InvalidCsrfTokenException. If you are using the default AccessDeniedHandl

spring security之httpSecurity 专题

  37.5.2 Resolving the CsrfToken Spring Security provides CsrfTokenArgumentResolver which can automatically resolve the current CsrfToken for Spring MVC arguments. By using @EnableWebSecurity you will automatically have this added to your Spring MVC

Spring Security笔记:使用数据库进行用户认证(form login using database)

在前一节,学习了如何自定义登录页,但是用户名.密码仍然是配置在xml中的,这样显然太非主流,本节将学习如何把用户名/密码/角色存储在db中,通过db来实现用户认证 一.项目结构 与前面的示例相比,因为要连接db,所以多出了一个spring-database.xml用来定义数据库连接,此外,为了演示登录用户权限不足的场景,加了一个页面403.jsp,用来统一显示权限不足的提示信息 二.数据库表结构(oracle环境) 1 create table T_USERS 2 ( 3 d_username

Spring Security笔记:使用BCrypt算法加密存储登录密码

在前一节使用数据库进行用户认证(form login using database)里,我们学习了如何把"登录帐号.密码"存储在db中,但是密码都是明文存储的,显然不太讲究.这一节将学习如何使用spring security3新加入的bcrypt算法,将登录加密存储到db中,并正常通过验证. 一.Bcrypt算法 1 int t = 0; 2 String password = "123456"; 3 System.out.println(password + &q

Access denied (java.lang.RuntimePermission getClas

今天在使用jetty做容器运行一个java web app时却给出了这样的错误: ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "getClassLoader")     at java.securit

Spring boot +Spring Security + Thymeleaf 认证失败返回错误信息

  [Please make sure to select the branch corresponding to the version of Thymeleaf you are using] Status This is a thymeleaf extras module, not a part of the Thymeleaf core (and as such following its own versioning schema), but fully supported by the

java.security.AccessControlException: access denie

Exception: Cannot load connection class because of underlying exception: 'java.security.AccessControlException: access denied (java.lang.RuntimePermission modifyThreadGroup)'. gwt 1.6 新建一个工程使用jdbc连接的时候有问题. 报的这个错误. 1.在run-> web application 的时候在hellowo

MySQL ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)的真正原因

在博客Linux mysql 5.6: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)里 面,我介绍了一下安装MySQL后登陆MySQL时会遇到ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) 这个错误,当时不知道真正的原因,搜索了一些网上的资料,测试验证了如何解决