0

I started working on Spring Security implementation and I'm currently having problems with user logout. When I try to logout I'm receiving a 404 response:

WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/logout] in DispatcherServlet with name 'mvc-dispatcher'

Here is a code of application-security.xml:

<form-login login-page="/loginForm"
                login-processing-url="/login"
                username-parameter="username"
                password-parameter="password"
                default-target-url="/"/>
<logout logout-url="/logout"
            logout-success-url="/loginForm"/>

And here is a part of jsp page responsible for logging out:

<div class="pull-right">
    <a href="<c:url value="/logout"/>" class="btn btn-default btn-flat">Sign out</a>
</div>

PS: <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> is added. Login works great, don't get what the problem might be with logout mapping. Thanks for help.

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Steve
  • 415
  • 2
  • 8
  • 24

0 Answers0