2014-02-14 3 views

답변

10
System.out.println(UI.getCurrent().getPage().getLocation().getHost()); 
System.out.println(UI.getCurrent().getPage().getLocation().getPath()); 
System.out.println(UI.getCurrent().getPage().getLocation().getPort()); 
6

을 내가 이런 식으로 작업을 수행합니다 :

String basePath = Page.getCurrent().getLocation().getScheme() + ":" + 
        Page.getCurrent().getLocation().getSchemeSpecificPart() 
1

나는 7 Vaadin이 작동 내가 이런 식으로 일을 6 angel이라는에서 Vaadin이 7

를 사용하지만, 아니에요 응용 프로그램 경로 부분은 브라우저 요청 경로가 아닌 실제 응용 프로그램 디렉토리를 가져 오려면 VaadinServlet.getCurrent().getServletContext().getContextPath()

을 사용하십시오.