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";
}