Problem with @PushStateNaviagtion & CDI


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:

As soon as the navigator notices that I am not logged in, I will be redirected to the LoginView:

However, the path should be as follows:

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;

        public void navigateTo(String navigationState) {
            try {
                // Redirect not authorized users to login page
                if(userManager.isAuthenticated()) {
                } else {
            } 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.

After further testing, I came to the conclusion that it doesn’t work with the current implementation. When a UI is annotated with @CDIUI(“”), the pathInfo is set to “/”. In the class “com.vaadin.ui.UI” causes the following line of code to remove not only the additional path information, but also the context path:

uiRootPath = uiRootPath.substring(0, uiRootPath.indexOf(uiPathInfo) + uiPathInfo.length());


will be translated to


If I annotate the UI with @CDIUI(“test”) then this function translates




and everything is working fine. But in this case my UI is not longer located in the root of the context path.

How you have defined the context path now? It looks like you have configured Manager-1.0-SNAPSHOT in it, but in a way push state navigation does not get it.

Yes, I think it is working exactly like that unless you override VaadinCDIServlet and define the context there with annotation.

Some one filed a ticket in GitHub related to this: