Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

static logout page

Tomasz Pepl
5 years ago Aug 16, 2017 9:47am
Marco Collovati
5 years ago Aug 16, 2017 7:28pm

Hi Tomasz,
you should predend the current contextPath to your html page path.
Assuming you are using maven to package yuor app as a war the page src/main/webapp/logout.html  will be accessible through the url /<contextPath>/logout.html.

To redirect to that page in your Vaadin 7.x app you should use 

getUI().getPage().setLocation(VaadinService.getCurrentRequest().getContextPath() + "/logout.html")

If you are using Vaadin 8.x you can use

Page.getCurrent().setLocation(VaadinRequest.getCurrent().getContextPath() + "/logout.html");