If you want to redirect to your current UI… but on your index View [
addView(“”, new View()) ];
final String path = VaadinServlet.getCurrent()
.getServletContext().getContextPath()
+ "/";
UI.getCurrent().getPage().setLocation(path);
You can also use that again if you want to navigate to anotherUi by adding anotherUi.
final String path = VaadinServlet.getCurrent()
.getServletContext().getContextPath()
+ "/anotherUi";
UI.getCurrent().getPage().setLocation(path);
You can also make a static Variables for your servlets (UI) if you want to.