I have a web project using spring security. The user starts with login.jsp, passes through authentication , And directs hello.jsp. Note that all JSP pages are searching in web-envelop. During this process, I note that the URL starts with And then showing me the HTTP status 404 after authentication instead of showing Hello. JSP. In the console output, I see this message: I'm not sure what is missing in the spring configuration? Following is the configuration code: and follow my web.xml: remove In addition to this you can refer to this tutorial: localhost: 8081 / project1 / pages / login.jsp , changing the URL to
http: // localhost: 8081 are given. / Project1 / pages / j_spring_security_check; Jsessionid = 792884C463EAC3C6CBC155EA75F4C6E4 .
Warning: no mapping was found for HTTP request with URI [/ Spring Security 3 / page / J_spring_SCAR_check] In the dispatcher circle, the name 'Spring Security 3 'with
& lt; Http auto-config = "true" & gt; & Lt; Intercept URL pattern = "/ welcome *" access = "ROLE_ADMIN" /> & Lt; Intercept-url pattern = "/ pages / hello.jsp" access = "ROLE_ADMIN" /> & Lt; Form-login login-page = "/ login" default-target-url = "/ welcome" authentication-failure-url = "/ loginfailed" / & gt; & Lt; Logout logout-success-url = "/ pages / login.jsp" /> & Lt; / Http & gt;
& lt; Filter & gt; & Lt; Filter-name & gt; SpringSecurityFilterChain & lt; / Filter-name & gt; & Lt; Filter range & gt; Org.springframework.web.filter.DelegatingFilterProxy & lt; / Filter-class & gt; & Lt; / Filter & gt; & Lt; Filter-mapping & gt; & Lt; Filter-name & gt; SpringSecurityFilterChain & lt; / Filter-name & gt; & Lt; URL pattern & gt; / * & Lt; / URL pattern & gt; & Lt; / Filter-mapping & gt; & Lt; Filter-mapping & gt; & Lt; Filter-name & gt; SpringSecurityFilterChain & lt; / Filter-name & gt; & Lt; URL pattern & gt; / Web-INF / pages / * & lt; / URL pattern & gt; & Lt; / Filter-mapping & gt;
& lt; Filter-Mapping & gt; & Lt; Filter-name & gt; SpringSecurityFilterChain & lt; / Filter-name & gt; & Lt; URL pattern & gt; / Web-INF / pages / * & lt; / URL pattern & gt; & Lt; / Filter-mapping & gt;
No comments:
Post a Comment