Error when navigating to a different path than web.xml default

Trying to migrate from v6 to v14, building upon bakery app.
Current app deployed on Wildfly 13 with given specs:

			<web-resource-name>Secure Content</web-resource-name>



DashboardServlet - mainly need it for that DashboardUI class

@VaadinServletConfiguration(ui = DashboardUI.class, productionMode = true)
@WebServlet(urlPatterns = "/*", name = "vaadinServlet", asyncSupported = true)
public class DashboardServlet

LoginView is the one from bakery, just added a different LoginListener.
MainView has PWA annotation.
Problem is as follows:
While logged off:
If I access http://localhost:8080/dashboardm/mobile/ I get LoginView.
If I access http://localhost:8080/dashboardm/mobile/locations I get blank page with errors [see attachment]
Any help appreciated.


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).

Thanks for your input.