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.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Link to homepage
Hi,
Link link = new Link("Click Me!", new ExternalResource("http://vaadin.com/"));
How can I create a link to my homepage? There is no InternalResource("/").
I looked at all the other XXXResource but found nothing. Do I have to get the web context and use ExternalResource with it?
Thanks,
Roland
Is this really the best way?
ServletContext servletContext = VaadinServlet.getCurrent().getServletContext();
ExternalResource er = new ExternalResource(servletContext.getContextPath()+"/");
Link label = new Link("XXXXX", er);