Replacement for Application.getURL

Hi there

we started creating a webapplication for our customer a while ago and it has become my duty to migrate Vaadi from 6 to 7. Among other things I can figure out (eventually) I have one quite big problem and that is Application.getURL from Vaadin 6.x
I cannot find a substitution for that in Vaadin 7. Not in UI, not in Page, not in Navigator… But I need to know the current location of the application. How can I get this information?

Thanks in advance

I think it is
Page.getLocation()
that you are looking for.

Cheers for the quick response. The JavaDoc states that the URL is the client-side representation of the URL, modified by proxies and what-not. Since I am using the URL on server-side to handle relative URLs from another web-app, this could lead to false information. Is there any other more secure way to retrieve the base URL of the vaadin application?

Sorry, can’t come up with an idea on how to get a server side URL, ie. localhost:8080/MyApp. Maybe someone else could give some pointers on that.

Could you access the other app in some other way than with a URL? Some RMI solution or something.

The URL as it’s seen by the server can be accessed through various methods in VaadinRequest and the underlying HttpServletRequest, e.g. getRequestURI(), getServerName() and getContextPath(). You can access the VaadinRequest e.g. using VaadinService.getCurrentRequest() and the HttpServletRequest using VaadinServletService.getCurrentServletRequest().