• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

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

 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • 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: 2
  • Mark post as helpful
  • send pies
  • 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: 41
  • Mark post as helpful
  • send pies
  • 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: 2
  • Mark post as helpful
  • send pies
  • 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: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I checked web.xml and it looks the same as mine.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!