Link to homepage


Link link = new Link(“Click Me!”, new ExternalResource(“”));

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?


Is this really the best way?

        ServletContext servletContext = VaadinServlet.getCurrent().getServletContext();
        ExternalResource er = new ExternalResource(servletContext.getContextPath()+"/");
        Link label = new Link("XXXXX", er);