Hi, I am rather new to Vaadin. I am having a similar problem to https://vaadin.com/forum/thread/17594578/flow-13-0-3-lost-context-prefix-when-navigate-to-root-view.
I have a java project called OpenWebVaadin02
I have 2 components a “LoginForm.java” and a “MainView.java”
The LoginForm is annotated with @Route(“”)
The MainView is annotated with @Route(“mainview”)
When I run the application (Run As - Run on Server and select a Tomcat 9 server). I get the LoginForm
correctly displayed at this URL:
http://localhost:8080/OpenWebVaadin02/
There is a button in the LoginForm that has a sentence in the click event
getUI().get().navigate(“mainview”);
And I can navigate to the MainView. It also works with his sentence:
getUI().get().navigate(MainView.class);
In the MainView there is a button that has this sentence in the click event
getUI().get().navigate(“”);
(or this one) getUI().get().navigate(LoginForm.class);
And when I press thje button from the MainView, the URL looses the name of the application
http://localhost:8080/
And I get an** HTTP Status 404 - Not Found error form the server:**
The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
PS: I am using in the pom.xml:
Vaadin version 13.0.3
vaadin-cdi-version 10.1.0
servlet.version 4.0.1
weld-cdi.version 3.1.0.Final