• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

j_spring_security_check - HTTP status 403 - Description The server understood the request but refuse

 
Ranch Hand
Posts: 123
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi. Im the new at Spring Security.
If I press log in, the site: http://localhost:8080/j_spring_security_check occurs with



Here is my web.xml



login.jsp

And here:  <form action="<c:url value="/j_spring_security_check"></c:url>" method="post"> `/j_spring_security_check` is marked on the red with the error: Cannot resolve controller URL '/j_spring_security_check' less



security-context.xml

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You forgot to allow spring recognize login page. You can specify it by using the following config in xml
<http use-expressions="true">
   <intercept-url pattern="/login*" access="isAnonymous()" />
   <intercept-url pattern="/**" access="isAuthenticated()"/>

   <form-login login-page='/login.html'
     default-target-url="/homepage.html"
     authentication-failure-url="/login.html?error=true" />
   <logout logout-success-url="/login.html" />
</http>
somethin like that.
And the end point will be localhost:8080/login.html
But I prefer to use the JavaConfig way. Try it too, may be it will be more easier.
Additional information you can find in the following link
Spring Security Login page explanation
 
must Janik
Ranch Hand
Posts: 123
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well.. I don't know what you paste here. I want to make it by java's way.
 
Sergey Kolesnikov
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you can download the following working project and try it out in action. Then compare with your own implementation and find missing elements. This is java's way.
 
must Janik
Ranch Hand
Posts: 123
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I checked web.xml and it looks the same as mine.
 
reply
    Bookmark Topic Watch Topic
  • New Topic