Hello,
I am currently trying to implement @PushStateNavigation and have a problem with it. The application is deployed under its own context path on my WildFly application server. When I now navigate to a view, the context path is removed and only the path of the view remains.
As an example, I call the application under:
http://localhost:8080/Manager-1.0-SNAPSHOT/
As soon as the navigator notices that I am not logged in, I will be redirected to the LoginView:
http://localhost:8080/login
However, the path should be as follows:
http://localhost:8080/Manager-1.0-SNAPSHOT/login
I configured the UI with the annotation @CDIUI (“”) (without servlet). The view has the annotation @CDIView (value = “login”).
The navigator is created as follows:
Navigator navigator = new Navigator(this, viewLayout.getContent()) {
private static final long serialVersionUID = 1837510418715700018L;
@Override
public void navigateTo(String navigationState) {
try {
// Redirect not authorized users to login page
if(userManager.isAuthenticated()) {
super.navigateTo(navigationState);
} else {
super.navigateTo("login");
}
} catch (Exception ex) {
handleNavigationError(navigationState, ex);
}
}
};
What do I have to configure so that PushStateNavigation does not remove the context path? I’m currently using Vaadin version 8.3.0.