Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » How to get URL or hostname/ip by which application is being accessed?
How to get URL or hostname/ip by which application is being accessed? [message #24977] Wed, 16 May 2007 13:52 Go to next message
Eclipse UserFriend
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 #25010 is a reply to message #24977] Wed, 16 May 2007 13:59 Go to previous messageGo to next message
Roberto Sanchez is currently offline Roberto SanchezFriend
Messages: 82
Registered: July 2009
Member
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?
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 20:44 Go to previous message
Eclipse UserFriend
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?
Previous Topic:Opening a PDF, HTML, or other document in a new browser window
Next Topic:What about eRAP
Goto Forum:
  


Current Time: Thu Sep 19 10:00:51 GMT 2024

Powered by FUDForum. Page generated in 0.04261 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top