Can I get the domain and deploy path?

Hi,

is it possible to get the domain and deploy path at vaadin (or java)?
For example I have a application running under:

http://www.mydomain.com/myNiceApp

I like to get “www.mydomain.com” and “myNiceApp” into a String. How could I do this?

Greetings
Hartmut

in vaadin6 in Application init this. or with getApplication()

String server = ((WebApplicationContext) this.getContext()).getHttpSession().getServletContext().getServerInfo(); // returns zb Apache Tomcat/Version

java.net.URL url = this.getURL(); // this. is Application
String s = url.getHost()+“:”+url.getPort()+url.getPath(); // Port ist evtl leer

in case that was the question.

My question to all
how to do that in vaadin7, somehow, since i dont find the getUrl() there, still I didnt look for it too much yet…

thank you

If you are interested in the point of view of a client, see Page.getLocation() - taking into account any URL remappings that may take place on (reverse) proxies for that client etc.