I’m not sure why do you expect that http://localhost:8080/dashboardm/mobile/locations works anyhow.
What do you expect when this page is loaded ?
mobile is your serlver URL mapping.
I guess LoginView has @Route("") annotation.
That’s why http://localhost:8080/dashboardm/mobile/ shows LoginView .
To be able to get something on http://localhost:8080/dashboardm/mobile/locations you need a route “locations” registered somehow.
One way to do it would be to add @Route("locations") annotation on a view which you want to see there.
Do you have such view with such annotation ?
When I access http://localhost:8080/dashboardm/mobile/locations I expect to be redirected to the login page.
mobile/locations should be covered by /mobile/*, that should redirect to /login.
LoginView has @Route(“login”). I even have a LocationsView with @Route(“mobile/locations”).
Nevertheless, I switched to using Spring security and everything is fine now, redirect works fine. A good example of how to get things done is in the bakery app.
Even if I access i.e http://localhost:8080/dashboardm/lfkgjdflkgjd, I get redirected to the login page: http://localhost:8080/dashboardm/login. After login, app is redirected to previously entered url (using Spring HttpSessionRequestCache).