0

I'm looking for a way to get the current URL from my Tomcat6 with Vaadin7. The URL is: mydomain:8080/MyProject.

I'm trying this.

public class MyURL {
      public MyURL(){
           System.out.println(VaadinServletService.getCurrentRequest().toString());
           System.out.println(VaadinServletService.getCurrentServletRequest().toString());
            System.out.println(VaadinServlet.getCurrent().toString());
      }

}

Any idea ?

FernandoPaiva
  • 4,410
  • 13
  • 59
  • 118

1 Answers1

0

You can use the getLocation() method of Page class.

UI.getCurrent().getPage().getLocation()
4J41
  • 5,005
  • 1
  • 29
  • 41