0

I want to get to the home page with this link:

 <c:url value="/home/home" var="url"/><a href="<c:out value='${url}'/>">Home</a>

And the home page is in the home folder.

But instead I have this error in my stacktrace

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

As you can see I was not even clicking on any link with a login url but instead that's what happens. And when I try to do it by typing in manually the home url, it changes to the login url and an error page is shown:

 HTTP Status 404 - The requested resource is not available. 

I really don't know why the login keeps coming up when I'm not requesting it.

My controllers

   @RequestMapping(value="/", method = RequestMethod.GET)
public String showLogin(ModelMap model) {
    logger.info("This is the login page {}.");

    return "login";

}

    @RequestMapping(value="/home/home", method = RequestMethod.GET)
public String showHome(ModelMap model) {

    return "home/home";

}
user2259555
  • 233
  • 3
  • 13
  • 24
  • I'm guessing `/home/home` is protected, and you have to log in somehow to be able to access it. Then some kind of authorization filter/interceptor tries to redirect to a login page. – NilsH Apr 30 '13 at 11:22
  • Yes thanks that's correct I can access the pages if I remove them from the intercept url. The only issue is the authentication. – user2259555 Apr 30 '13 at 11:50

0 Answers0