This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Hands On Software Engineering with Python and have Brian Allbey on-line!
See this thread for details.
Win a copy of Hands On Software Engineering with Python this week in the Jython/Python forum!
  • 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
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

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

 
Ranch Hand
Posts: 66
  • 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: 66
  • 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: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I checked web.xml and it looks the same as mine.
 
You're not going crazy. You're going sane in a crazy word. Find comfort in this tiny ad:
Programmatically Create PDF Using Free Spire.PDF with Java
https://coderanch.com/wiki/703735/Programmatically-Create-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!