Copy-pasting of links leads to "Request was not handled by any registered h

Hi guys,

I am working on a Vaadin web application and just ran into an issue for which I don’t know what the reason is.

The application uses Vaadin 8.1.5, the CDI-Helpers add-on (2.1), and the History API Navigation add-on (0.2.1). A requirement is to have bookmarkable links which are programmatically updatable and can be used with the browser back/forward functionality.Therefore, my UI class looks like this:

public class MyUI extends ViewMenuUI {
  protected void init(VaadinRequest request) {
    Navigator navigator = HistoryApiNavigatorFactory.createHistoryApiNavigator(this, viewMenuLayout.getMainContent());  

And a view:

@CDIView(value = "/page1/sub", supportsParameters = true)
public class PageView extends VerticalLayout implements View { }

The navigation bar generated by the CDI-Helpers add-on is just working fine, for example, visiting the URL by clicking on the button leads me to the expected page. However, as I mentioned earlier, I need bookmarkable links (with parameters, but that’s not important for now). So I copied the URL and pasted it in a new browser tab and, surprise, it is not working. I get the following message displayed:

Request was not handled by any registered handler.

I took a look at what URL my browser is posting to when clicking on the navigation menu entry. Following is the output:

I guess this is a session bound url for the user and that the handling is taken care of inside the button logic. Is that true?

But the problem persists that when I am copy pasting the url, the view is not shown. Does anyone have a clue why the request fails?

Thanks in advance

Hi Stephan,

I think the issue lies in the way our CDI plug-in registers URLs. As of right now I think it registers the path exactly as it is given with CDIUI annotation (In this case “/”) and it does not support wildcards that would actually make it work. There’s an initiail Pull Request for fixing this issue in our CDI repo which we hope we can handle soon:

I will look into this issue as soon as we get our 8.2 release process rolling and have time.

// Teemu

Hi Teemu,

thanks for your answer. I’ll look forward to the fix. In the meantime, can you suggest a workaround or so? It doesn’t need to be a pretty solution as it is just for a prototype, but this working would be really great.

Best regards