How to get URL or hostname/ip by which application is being accessed? [message #24977] |
Wed, 16 May 2007 09:52  |
Eclipse User |
|
|
|
Originally posted by: kendotlarson.mindspring.com
I'm using the extension point
org.eclipse.equinox.http.registry.resources to be able to serve up some
files to display in a Browser widget.
I need to be able to tell the Browser widget the correct URL, which
ideally would come from the base URL with which my RAP app is being called.
I am currently using InetAddress.getLocalHost() to do this, but this
seems less than ideal, if the server is on multiple networks, for example.
Is there a better way?
|
|
|
|
Re: How to get URL or hostname/ip by which application is being accessed? [message #25228 is a reply to message #25010] |
Wed, 16 May 2007 16:44  |
Eclipse User |
|
|
|
Originally posted by: kendotlarson.mindspring.com
Thanks, that works great for me.
Roberto Sánchez wrote:
> Hi Ken, I don't know if this is the best way, but it works fine for me :-)
>
> import com.w4t.engine.requests.URLHelper;
>
> String baseUrl = URLHelper.getURLString( false);
>
> Regards.
> Roberto.
>
>
>
> Ken Larson escribió:
>> I'm using the extension point
>> org.eclipse.equinox.http.registry.resources to be able to serve up
>> some files to display in a Browser widget.
>>
>> I need to be able to tell the Browser widget the correct URL, which
>> ideally would come from the base URL with which my RAP app is being
>> called.
>>
>> I am currently using InetAddress.getLocalHost() to do this, but this
>> seems less than ideal, if the server is on multiple networks, for
>> example.
>>
>> Is there a better way?
|
|
|
Powered by
FUDForum. Page generated in 0.03963 seconds