You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Web Toolkit
For RPC communication, I need server IP address and port which is
specified in URL.
e.g. In 'http://10.4.6.131:8181/webClient.html' url 10.4.6.131 IP
address and 8181 port.
How to get this IP and port in GWT?
Thanks in advance,
Vikas
ThomasWrobel
unread,
Sep 8, 2009, 8:15:38 AM9/8/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Web Toolkit
I dont think theres a simple way, youd need to get the whole URL, look
between the second / and the 3rd /, then split the string around the
" : "
IP = UrlString.split(":")[0];
Port = UrlString.split(":")[1];
hezjing
unread,
Sep 8, 2009, 8:21:26 AM9/8/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to google-we...@googlegroups.com
Hi Vikas,
How about retrieve the HttpServletRequest instance, then getLocalAddr() and getLocalPort()?
You may want to check out the rest of the useful getter methods in HttpServletRequest.
--
Hez
Raphael André Bauer
unread,
Sep 8, 2009, 8:35:50 AM9/8/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to google-we...@googlegroups.com
On Tue, Sep 8, 2009 at 11:55 AM, Vikas<vikas....@gmail.com> wrote:
>
> For RPC communication, I need server IP address and port which is
> specified in URL.
> e.g. In 'http://10.4.6.131:8181/webClient.html' url 10.4.6.131 IP
> address and 8181 port.
>
> How to get this IP and port in GWT?
this native function might help:
public static native String getURL() /*-{
return $wnd.location.href;
}-*/;
cheers,
r
>
> Thanks in advance,
> Vikas
>
> >
>
Alexander Cherednichenko
unread,
Sep 8, 2009, 10:33:03 AM9/8/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Web Toolkit
I'd get it on the host page (in servlet env) and then accessed via
local variable in client code.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Web Toolkit
On 8 sep, 11:55, Vikas <vikas.m.ya...@gmail.com> wrote:
> For RPC communication, I need server IP address and port which is
> specified in URL.
> e.g. In 'http://10.4.6.131:8181/webClient.html'url 10.4.6.131 IP
> address and 8181 port.
>
> How to get this IP and port in GWT?
Window.Location.getHostName() and Window.Location.getPort() ?
Vikas
unread,
Sep 9, 2009, 1:19:25 AM9/9/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Web Toolkit
Thanks to all of you for your help.
Window.Location.getHostName() and Window.Location.getPort() is working
fine for me :)
On Sep 8, 9:41 pm, Thomas Broyer <t.bro...@gmail.com> wrote:
> On 8 sep, 11:55, Vikas <vikas.m.ya...@gmail.com> wrote:
>
> > For RPC communication, I need server IP address and port which is
> > specified inURL.