peppeuz
peppeuz

Reputation: 231

404 on 'j_spring_security_check'

I think the best way to explain my problem is with a screenshot:

imgbin.org/index.php?page=image&id=16564

Basically I'm trying to follow this mkyong tutorial

(http://www.mkyong.com/spring-security/spring-security-form-login-example/)

for a school project. I get redirected to the login page, but when i try to login with any credentials, i get the action value printed on the url.

Could it be a encoding related problem? Any idea how to solve it? Here's my controller, security.xml and web.xml.

Thanks!

spring-security.xml:

pastebin.com/MS7VYSfs

web.xml:

pastebin.com/EpGPc40Q

login.jsp:

pastebin.com/8Q4hxdVs

Upvotes: 0

Views: 201

Answers (1)

Shaun the Sheep
Shaun the Sheep

Reputation: 22742

I'd guess you haven't imported the standard JSTL library in your login page, hence you get the literal <c:url embedded in the page. You should check what is actually rendered in your browser when it loads the page.

Either add

<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

at the top of your login page, or try it with

<form action="j_security_check" method="POST">

Upvotes: 2

Related Questions