You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Mihai Toma <mi...@asf.ro> on 2009/07/29 11:39:35 UTC

FW: servlet request header information

Hi,

 

I want to get some information from request  header using something like the
code bellow but for my requests I receive null.

 

                                HttpServletRequest request =
((ServletWebRequest) getRequest())

 
.getHttpServletRequest();

                                System.out.println("Http via:
"+request.getHeader("HTTP_VIA"));

                                System.out.println("Remote adr:
"+request.getHeader("REMOTE_ADDR"));

                                System.out.println("X_FORWARD adr:
"+request.getHeader("HTTP_X_FORWARDED_FOR"));

 

 

Can anyone tell me if there is other way to get all these information.

 

In fact I want to get the ip address of the request. Using the
request.getRemoteAddr() I receive only the proxy ip and not the real one.

 

Thanks in advance!

Tomike