Re: How to get the remote address (IP)
That's an unpopulated (not localhost) ipv6 address. - Brill On 29-Jul-08, at 6:35 AM, Kaspar Fischer wrote: I try to obtain the client's remote address from the session: WebClientInfo info = (WebClientInfo) session.getClientInfo(); final String remoteAddress = info.getProperties().getRemoteAddress(); This results in "0:0:0:0:0:0:0:1%0". Any idea what might be wrong? Thanks a lot, Kaspar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to get the remote address (IP)
try: final ServletWebRequest req = (ServletWebRequest) RequestCycle.get().getRequest(); final String remoteAddr = req.getHttpServletRequest().getRemoteAddr(); regards, Michael hbf wrote: > > I try to obtain the client's remote address from the session: > >WebClientInfo info = (WebClientInfo) session.getClientInfo(); >final String remoteAddress = info.getProperties().getRemoteAddress(); > > This results in "0:0:0:0:0:0:0:1%0". Any idea what might be wrong? > Thanks a lot, Kaspar > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/How-to-get-the-remote-address-%28IP%29-tp18709448p18710838.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to get the remote address (IP)
Is your browser running on the same machine as the webserver? If so, you might want to read this: http://en.wikipedia.org/wiki/IPv6#Special_addresses On Tue, Jul 29, 2008 at 1:48 PM, Kaspar Fischer <[EMAIL PROTECTED]> wrote: > On 29.07.2008, at 12:53, Hoover, William wrote: > >> did you try >> getRequestCycleSettings().setGatherExtendedBrowserInfo(true); in your >> WebApplication? > > William, thanks for your answer. I indeed did not set this in my > application. But if I do, I still obtain the same result. > > However, isn't there a cheap way to obtain the client's IP? > If possible, I'd like to avoid gathering extended browser info. > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to get the remote address (IP)
On 29.07.2008, at 12:53, Hoover, William wrote: did you try getRequestCycleSettings().setGatherExtendedBrowserInfo(true); in your WebApplication? William, thanks for your answer. I indeed did not set this in my application. But if I do, I still obtain the same result. However, isn't there a cheap way to obtain the client's IP? If possible, I'd like to avoid gathering extended browser info. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to get the remote address (IP)
did you try getRequestCycleSettings().setGatherExtendedBrowserInfo(true); in your WebApplication? -Original Message- From: Kaspar Fischer [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 29, 2008 6:35 AM To: users@wicket.apache.org Subject: How to get the remote address (IP) I try to obtain the client's remote address from the session: WebClientInfo info = (WebClientInfo) session.getClientInfo(); final String remoteAddress = info.getProperties().getRemoteAddress(); This results in "0:0:0:0:0:0:0:1%0". Any idea what might be wrong? Thanks a lot, Kaspar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to get the remote address (IP)
I try to obtain the client's remote address from the session: WebClientInfo info = (WebClientInfo) session.getClientInfo(); final String remoteAddress = info.getProperties().getRemoteAddress(); This results in "0:0:0:0:0:0:0:1%0". Any idea what might be wrong? Thanks a lot, Kaspar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]