Re: [Wicket-user] Remote Address

2007-05-07 Thread Timo Rantalaiho
On Sun, 06 May 2007, howzat wrote:
 What is the right way in Wicket to get the ip address of the client?

We've done it by digging the HttpServletRequest from Wicket's
own request class

  
http://wicketframework.org/apidocs/wicket/protocol/http/servlet/ServletWebRequest.html

but have no idea if this is the ideal way.

-- 
Timo Rantalaiho   
Reaktor Innovations OyURL: http://www.ri.fi/ 

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Remote Address

2007-05-07 Thread Johan Compagner

yes you can get it right from the httprequest
But you can also use our ClientInfo/ClientProperties class for this
see Session.getClientInfo()


On 5/7/07, Timo Rantalaiho [EMAIL PROTECTED] wrote:


On Sun, 06 May 2007, howzat wrote:
 What is the right way in Wicket to get the ip address of the client?

We've done it by digging the HttpServletRequest from Wicket's
own request class


http://wicketframework.org/apidocs/wicket/protocol/http/servlet/ServletWebRequest.html

but have no idea if this is the ideal way.

--
Timo Rantalaiho
Reaktor Innovations OyURL: http://www.ri.fi/ 

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Remote Address

2007-05-07 Thread howzat

Thanks Tino  John.
I was hoping to get it using ClientInfo/ClientProperties class for this from
Session.getClientInfo() as my first guess too. But I can only see the
following (ie no ip address) properties:

ClientProperties: {quirkIETablePercentWidthScrollbarError=true,
proprietaryIEPngAlphaFilterRequired=true,
quirkCssPositioningOneSideOnly=true,
quirkIETextareaNewlineObliteration=true,
quirkCssBorderCollapseFor0Padding=true,
quirkCssBackgroundAttachmentUseFixed=true, quirkIERepaint=true,
quirkCssBorderCollapseInside=true, browserInternetExplorer=true,
browserVersionMajor=6, quirkIESelectListDomUpdate=true,
proprietaryIECssExpressionsSupported=true, quirkIESelectZIndex=true,
quirkIESelectPercentWidth=true}




Johan Compagner wrote:
 
 yes you can get it right from the httprequest
 But you can also use our ClientInfo/ClientProperties class for this
 see Session.getClientInfo()
 
 
 On 5/7/07, Timo Rantalaiho [EMAIL PROTECTED] wrote:

 On Sun, 06 May 2007, howzat wrote:
  What is the right way in Wicket to get the ip address of the client?

 We've done it by digging the HttpServletRequest from Wicket's
 own request class


 http://wicketframework.org/apidocs/wicket/protocol/http/servlet/ServletWebRequest.html

 but have no idea if this is the ideal way.

 --
 Timo Rantalaiho
 Reaktor Innovations OyURL: http://www.ri.fi/ 

 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user

 
 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 

-- 
View this message in context: 
http://www.nabble.com/Remote-Address-tf3701431.html#a10355023
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Remote Address

2007-05-07 Thread Johan Compagner

which version do you use?
i think that is rewritten in 1.3 and i do see remote address there

johan


On 5/7/07, howzat [EMAIL PROTECTED] wrote:



Thanks Tino  John.
I was hoping to get it using ClientInfo/ClientProperties class for this
from
Session.getClientInfo() as my first guess too. But I can only see the
following (ie no ip address) properties:

ClientProperties: {quirkIETablePercentWidthScrollbarError=true,
proprietaryIEPngAlphaFilterRequired=true,
quirkCssPositioningOneSideOnly=true,
quirkIETextareaNewlineObliteration=true,
quirkCssBorderCollapseFor0Padding=true,
quirkCssBackgroundAttachmentUseFixed=true, quirkIERepaint=true,
quirkCssBorderCollapseInside=true, browserInternetExplorer=true,
browserVersionMajor=6, quirkIESelectListDomUpdate=true,
proprietaryIECssExpressionsSupported=true, quirkIESelectZIndex=true,
quirkIESelectPercentWidth=true}




Johan Compagner wrote:

 yes you can get it right from the httprequest
 But you can also use our ClientInfo/ClientProperties class for this
 see Session.getClientInfo()


 On 5/7/07, Timo Rantalaiho [EMAIL PROTECTED] wrote:

 On Sun, 06 May 2007, howzat wrote:
  What is the right way in Wicket to get the ip address of the client?

 We've done it by digging the HttpServletRequest from Wicket's
 own request class



http://wicketframework.org/apidocs/wicket/protocol/http/servlet/ServletWebRequest.html

 but have no idea if this is the ideal way.

 --
 Timo Rantalaiho
 Reaktor Innovations OyURL: http://www.ri.fi/ 


-
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



-
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



--
View this message in context:
http://www.nabble.com/Remote-Address-tf3701431.html#a10355023
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Remote Address

2007-05-07 Thread howzat

As stated in my initial post I am using 1.2.6 (as there is more published
material to learn from for 1.x) and plan to eventually move straight up to
2.0 (mainly for java 5 enhancements). 
Is there a concrete code snippet somewhere that demonstrates how to get the
user's ip address in 1.2.6 ?



Johan Compagner wrote:
 
 which version do you use?
 i think that is rewritten in 1.3 and i do see remote address there
 
 johan
 
 
 On 5/7/07, howzat [EMAIL PROTECTED] wrote:


 Thanks Tino  John.
 I was hoping to get it using ClientInfo/ClientProperties class for this
 from
 Session.getClientInfo() as my first guess too. But I can only see the
 following (ie no ip address) properties:

 ClientProperties: {quirkIETablePercentWidthScrollbarError=true,
 proprietaryIEPngAlphaFilterRequired=true,
 quirkCssPositioningOneSideOnly=true,
 quirkIETextareaNewlineObliteration=true,
 quirkCssBorderCollapseFor0Padding=true,
 quirkCssBackgroundAttachmentUseFixed=true, quirkIERepaint=true,
 quirkCssBorderCollapseInside=true, browserInternetExplorer=true,
 browserVersionMajor=6, quirkIESelectListDomUpdate=true,
 proprietaryIECssExpressionsSupported=true, quirkIESelectZIndex=true,
 quirkIESelectPercentWidth=true}




 Johan Compagner wrote:
 
  yes you can get it right from the httprequest
  But you can also use our ClientInfo/ClientProperties class for this
  see Session.getClientInfo()
 
 
  On 5/7/07, Timo Rantalaiho [EMAIL PROTECTED] wrote:
 
  On Sun, 06 May 2007, howzat wrote:
   What is the right way in Wicket to get the ip address of the client?
 
  We've done it by digging the HttpServletRequest from Wicket's
  own request class
 
 
 
 http://wicketframework.org/apidocs/wicket/protocol/http/servlet/ServletWebRequest.html
 
  but have no idea if this is the ideal way.
 
  --
  Timo Rantalaiho
  Reaktor Innovations OyURL: http://www.ri.fi/ 
 
 
 -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 
 -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 

 --
 View this message in context:
 http://www.nabble.com/Remote-Address-tf3701431.html#a10355023
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user

 
 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 

-- 
View this message in context: 
http://www.nabble.com/Remote-Address-tf3701431.html#a10355526
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Remote Address

2007-05-07 Thread Johan Compagner

see Timo's post about the ServletWebRequest.

((WebRequestCycle)RequestCycle.get()).getHttpServletRequest()

johan


On 5/7/07, howzat [EMAIL PROTECTED] wrote:



As stated in my initial post I am using 1.2.6 (as there is more published
material to learn from for 1.x) and plan to eventually move straight up to
2.0 (mainly for java 5 enhancements).
Is there a concrete code snippet somewhere that demonstrates how to get
the
user's ip address in 1.2.6 ?



Johan Compagner wrote:

 which version do you use?
 i think that is rewritten in 1.3 and i do see remote address there

 johan


 On 5/7/07, howzat [EMAIL PROTECTED] wrote:


 Thanks Tino  John.
 I was hoping to get it using ClientInfo/ClientProperties class for this
 from
 Session.getClientInfo() as my first guess too. But I can only see the
 following (ie no ip address) properties:

 ClientProperties: {quirkIETablePercentWidthScrollbarError=true,
 proprietaryIEPngAlphaFilterRequired=true,
 quirkCssPositioningOneSideOnly=true,
 quirkIETextareaNewlineObliteration=true,
 quirkCssBorderCollapseFor0Padding=true,
 quirkCssBackgroundAttachmentUseFixed=true, quirkIERepaint=true,
 quirkCssBorderCollapseInside=true, browserInternetExplorer=true,
 browserVersionMajor=6, quirkIESelectListDomUpdate=true,
 proprietaryIECssExpressionsSupported=true, quirkIESelectZIndex=true,
 quirkIESelectPercentWidth=true}




 Johan Compagner wrote:
 
  yes you can get it right from the httprequest
  But you can also use our ClientInfo/ClientProperties class for this
  see Session.getClientInfo()
 
 
  On 5/7/07, Timo Rantalaiho [EMAIL PROTECTED] wrote:
 
  On Sun, 06 May 2007, howzat wrote:
   What is the right way in Wicket to get the ip address of the
client?
 
  We've done it by digging the HttpServletRequest from Wicket's
  own request class
 
 
 

http://wicketframework.org/apidocs/wicket/protocol/http/servlet/ServletWebRequest.html
 
  but have no idea if this is the ideal way.
 
  --
  Timo Rantalaiho
  Reaktor Innovations OyURL: http://www.ri.fi/ 
 
 

-
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 

-
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 

 --
 View this message in context:
 http://www.nabble.com/Remote-Address-tf3701431.html#a10355023
 Sent from the Wicket - User mailing list archive at Nabble.com.



-
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



-
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



--
View this message in context:
http://www.nabble.com/Remote-Address-tf3701431.html#a10355526
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.

Re: [Wicket-user] Remote Address

2007-05-07 Thread howzat

Thanks for the suggestion but I'm not sure I understand you properly. Have
you tried that?
((WebRequestCycle)RequestCycle.get()).getHttpServletRequest()
doesn't exist (1.2.6) .

and 
((WebRequestCycle)RequestCycle.get()).getRequest().getParameterMap().keySet()
returns only:
[previewForm:hf:0, userAnswer, wicket:interface]

All I need is to get the ip address of the client. Has any one else had a go
at this in Wicket 1.2.6 ?





Johan Compagner wrote:
 
 see Timo's post about the ServletWebRequest.
 
 ((WebRequestCycle)RequestCycle.get()).getHttpServletRequest()
 
 johan
 
 
 On 5/7/07, howzat [EMAIL PROTECTED] wrote:


 As stated in my initial post I am using 1.2.6 (as there is more published
 material to learn from for 1.x) and plan to eventually move straight up
 to
 2.0 (mainly for java 5 enhancements).
 Is there a concrete code snippet somewhere that demonstrates how to get
 the
 user's ip address in 1.2.6 ?



 Johan Compagner wrote:
 
  which version do you use?
  i think that is rewritten in 1.3 and i do see remote address there
 
  johan
 
 
  On 5/7/07, howzat [EMAIL PROTECTED] wrote:
 
 
  Thanks Tino  John.
  I was hoping to get it using ClientInfo/ClientProperties class for
 this
  from
  Session.getClientInfo() as my first guess too. But I can only see the
  following (ie no ip address) properties:
 
  ClientProperties: {quirkIETablePercentWidthScrollbarError=true,
  proprietaryIEPngAlphaFilterRequired=true,
  quirkCssPositioningOneSideOnly=true,
  quirkIETextareaNewlineObliteration=true,
  quirkCssBorderCollapseFor0Padding=true,
  quirkCssBackgroundAttachmentUseFixed=true, quirkIERepaint=true,
  quirkCssBorderCollapseInside=true, browserInternetExplorer=true,
  browserVersionMajor=6, quirkIESelectListDomUpdate=true,
  proprietaryIECssExpressionsSupported=true, quirkIESelectZIndex=true,
  quirkIESelectPercentWidth=true}
 
 
 
 
  Johan Compagner wrote:
  
   yes you can get it right from the httprequest
   But you can also use our ClientInfo/ClientProperties class for this
   see Session.getClientInfo()
  
  
   On 5/7/07, Timo Rantalaiho [EMAIL PROTECTED] wrote:
  
   On Sun, 06 May 2007, howzat wrote:
What is the right way in Wicket to get the ip address of the
 client?
  
   We've done it by digging the HttpServletRequest from Wicket's
   own request class
  
  
  
 
 http://wicketframework.org/apidocs/wicket/protocol/http/servlet/ServletWebRequest.html
  
   but have no idea if this is the ideal way.
  
   --
   Timo Rantalaiho
   Reaktor Innovations OyURL: http://www.ri.fi/ 
  
  
 
 -
   This SF.net email is sponsored by DB2 Express
   Download DB2 Express C - the FREE version of DB2 express and take
   control of your XML. No limits. Just data. Click to get it now.
   http://sourceforge.net/powerbar/db2/
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
  
  
  
 
 -
   This SF.net email is sponsored by DB2 Express
   Download DB2 Express C - the FREE version of DB2 express and take
   control of your XML. No limits. Just data. Click to get it now.
   http://sourceforge.net/powerbar/db2/
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
  
  
 
  --
  View this message in context:
  http://www.nabble.com/Remote-Address-tf3701431.html#a10355023
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
 
 -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 
 -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 

 --
 View this message in context:
 http://www.nabble.com/Remote-Address-tf3701431.html#a10355526
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and 

Re: [Wicket-user] Remote Address

2007-05-07 Thread mathias axelsson

   ((WebRequest) (WebRequestCycle.get().getRequest()))
   .getHttpServletRequest().getRemoteHost();

should work I think.

On 5/7/07, howzat [EMAIL PROTECTED] wrote:



Thanks for the suggestion but I'm not sure I understand you properly. Have
you tried that?
((WebRequestCycle)RequestCycle.get()).getHttpServletRequest()
doesn't exist (1.2.6) .

and
((WebRequestCycle)RequestCycle.get()).getRequest().getParameterMap().keySet()

returns only:
[previewForm:hf:0, userAnswer, wicket:interface]

All I need is to get the ip address of the client. Has any one else had a
go
at this in Wicket 1.2.6 ?





Johan Compagner wrote:

 see Timo's post about the ServletWebRequest.

 ((WebRequestCycle)RequestCycle.get()).getHttpServletRequest()

 johan


 On 5/7/07, howzat  [EMAIL PROTECTED] wrote:


 As stated in my initial post I am using 1.2.6 (as there is more
published
 material to learn from for 1.x) and plan to eventually move straight up

 to
 2.0 (mainly for java 5 enhancements).
 Is there a concrete code snippet somewhere that demonstrates how to get
 the
 user's ip address in 1.2.6 ?



 Johan Compagner wrote:
 
  which version do you use?
  i think that is rewritten in 1.3 and i do see remote address there
 
  johan
 
 
  On 5/7/07, howzat [EMAIL PROTECTED] wrote:
 
 
  Thanks Tino  John.
  I was hoping to get it using ClientInfo/ClientProperties class for
 this
  from
  Session.getClientInfo() as my first guess too. But I can only see
the
  following (ie no ip address) properties:
 
  ClientProperties: {quirkIETablePercentWidthScrollbarError=true,
  proprietaryIEPngAlphaFilterRequired=true,
  quirkCssPositioningOneSideOnly=true,
  quirkIETextareaNewlineObliteration=true,
  quirkCssBorderCollapseFor0Padding=true,
  quirkCssBackgroundAttachmentUseFixed=true, quirkIERepaint=true,
  quirkCssBorderCollapseInside=true, browserInternetExplorer=true,
  browserVersionMajor=6, quirkIESelectListDomUpdate=true,
  proprietaryIECssExpressionsSupported=true, quirkIESelectZIndex=true,

  quirkIESelectPercentWidth=true}
 
 
 
 
  Johan Compagner wrote:
  
   yes you can get it right from the httprequest
   But you can also use our ClientInfo/ClientProperties class for
this
   see Session.getClientInfo()
  
  
   On 5/7/07, Timo Rantalaiho  [EMAIL PROTECTED] wrote:
  
   On Sun, 06 May 2007, howzat wrote:
What is the right way in Wicket to get the ip address of the
 client?
  
   We've done it by digging the HttpServletRequest from Wicket's
   own request class
  
  
  
 
 
http://wicketframework.org/apidocs/wicket/protocol/http/servlet/ServletWebRequest.html

  
   but have no idea if this is the ideal way.
  
   --
   Timo Rantalaiho
   Reaktor Innovations OyURL: http://www.ri.fi/ 
  
  
 

-
   This SF.net email is sponsored by DB2 Express
   Download DB2 Express C - the FREE version of DB2 express and take
   control of your XML. No limits. Just data. Click to get it now.
   http://sourceforge.net/powerbar/db2/
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
  
  
  
 

-
   This SF.net email is sponsored by DB2 Express
   Download DB2 Express C - the FREE version of DB2 express and take
   control of your XML. No limits. Just data. Click to get it now.
   http://sourceforge.net/powerbar/db2/
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
  
  
 
  --
  View this message in context:
  http://www.nabble.com/Remote-Address-tf3701431.html#a10355023
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
 

-
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 

-
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 

 --
 View this message in context:
 http://www.nabble.com/Remote-Address-tf3701431.html#a10355526
 Sent from the Wicket - User mailing list archive at Nabble.com.




Re: [Wicket-user] Remote Address

2007-05-07 Thread Tauren Mills
I do this:

log.info(  RemoteAddr:  +
((WebRequest)getRequest()).getHttpServletRequest().getRemoteAddr());

Works for me in 1.2.5.  Will be upgrading to 1.2.6 soon, so I hope it
still works.

Tauren


On 5/7/07, mathias axelsson [EMAIL PROTECTED] wrote:
 ((WebRequest) (WebRequestCycle.get().getRequest()))
 .getHttpServletRequest().getRemoteHost();

 should work I think.


 On 5/7/07, howzat [EMAIL PROTECTED] wrote:
 
  Thanks for the suggestion but I'm not sure I understand you properly. Have
  you tried that?
 
 ((WebRequestCycle)RequestCycle.get()).getHttpServletRequest()
  doesn't exist (1.2.6) .
 
  and
 
 ((WebRequestCycle)RequestCycle.get()).getRequest().getParameterMap().keySet()
  returns only:
  [previewForm:hf:0, userAnswer, wicket:interface]
 
  All I need is to get the ip address of the client. Has any one else had a
 go
  at this in Wicket 1.2.6 ?
 
 
 
 
 
  Johan Compagner wrote:
  
   see Timo's post about the ServletWebRequest.
  
  
 ((WebRequestCycle)RequestCycle.get()).getHttpServletRequest()
  
   johan
  
  
   On 5/7/07, howzat  [EMAIL PROTECTED] wrote:
  
  
   As stated in my initial post I am using 1.2.6 (as there is more
 published
   material to learn from for 1.x) and plan to eventually move straight up
   to
   2.0 (mainly for java 5 enhancements).
   Is there a concrete code snippet somewhere that demonstrates how to get
   the
   user's ip address in 1.2.6 ?
  
  
  
   Johan Compagner wrote:
   
which version do you use?
i think that is rewritten in 1.3 and i do see remote address there
   
johan
   
   
On 5/7/07, howzat [EMAIL PROTECTED]  wrote:
   
   
Thanks Tino  John.
I was hoping to get it using ClientInfo/ClientProperties class for
   this
from
Session.getClientInfo() as my first guess too. But I can only see
 the
following (ie no ip address) properties:
   
ClientProperties:
 {quirkIETablePercentWidthScrollbarError=true,
proprietaryIEPngAlphaFilterRequired=true,
quirkCssPositioningOneSideOnly=true,
quirkIETextareaNewlineObliteration=true,
quirkCssBorderCollapseFor0Padding=true,
quirkCssBackgroundAttachmentUseFixed=true,
 quirkIERepaint=true,
quirkCssBorderCollapseInside=true,
 browserInternetExplorer=true,
browserVersionMajor=6,
 quirkIESelectListDomUpdate=true,
proprietaryIECssExpressionsSupported=true,
 quirkIESelectZIndex=true,
quirkIESelectPercentWidth=true}
   
   
   
   
Johan Compagner wrote:

 yes you can get it right from the httprequest
 But you can also use our ClientInfo/ClientProperties class for
 this
 see Session.getClientInfo()


 On 5/7/07, Timo Rantalaiho  [EMAIL PROTECTED] wrote:

 On Sun, 06 May 2007, howzat wrote:
  What is the right way in Wicket to get the ip address of the
   client?

 We've done it by digging the HttpServletRequest from Wicket's
 own request class



   
  
 http://wicketframework.org/apidocs/wicket/protocol/http/servlet/ServletWebRequest.html

 but have no idea if this is the ideal way.

 --
 Timo Rantalaiho
 Reaktor Innovations OyURL: http://www.ri.fi/ 


   
  
 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net

 https://lists.sourceforge.net/lists/listinfo/wicket-user



   
  
 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net

 https://lists.sourceforge.net/lists/listinfo/wicket-user


   
--
View this message in context:
   
 http://www.nabble.com/Remote-Address-tf3701431.html#a10355023
Sent from the Wicket - User mailing list archive at Nabble.com.
   
   
   
  
 -
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
   
 https://lists.sourceforge.net/lists/listinfo/wicket-user
   
   
   
  
 

Re: [Wicket-user] Remote Address

2007-05-07 Thread howzat

Thanks Mathias, that's exactly what I was after and it works.
Looking at the bigger picture, is it considered to be reasonable practice in
Wicket to cut through all its high-level abstractions, right down to the
wire (or servlet api anyway)? I suppose an ip address is quite a low-level
bit of info (depending on your domain).


mathias axelsson wrote:
 
 ((WebRequest) (WebRequestCycle.get().getRequest()))
 .getHttpServletRequest().getRemoteHost();
 
 should work I think.
 
 On 5/7/07, howzat [EMAIL PROTECTED] wrote:


 Thanks for the suggestion but I'm not sure I understand you properly.
 Have
 you tried that?
 ((WebRequestCycle)RequestCycle.get()).getHttpServletRequest()
 doesn't exist (1.2.6) .

 and
 ((WebRequestCycle)RequestCycle.get()).getRequest().getParameterMap().keySet()

 returns only:
 [previewForm:hf:0, userAnswer, wicket:interface]

 All I need is to get the ip address of the client. Has any one else had a
 go
 at this in Wicket 1.2.6 ?





 Johan Compagner wrote:
 
  see Timo's post about the ServletWebRequest.
 
  ((WebRequestCycle)RequestCycle.get()).getHttpServletRequest()
 
  johan
 
 
  On 5/7/07, howzat  [EMAIL PROTECTED] wrote:
 
 
  As stated in my initial post I am using 1.2.6 (as there is more
 published
  material to learn from for 1.x) and plan to eventually move straight
 up

  to
  2.0 (mainly for java 5 enhancements).
  Is there a concrete code snippet somewhere that demonstrates how to
 get
  the
  user's ip address in 1.2.6 ?
 
 
 
  Johan Compagner wrote:
  
   which version do you use?
   i think that is rewritten in 1.3 and i do see remote address there
  
   johan
  
  
   On 5/7/07, howzat [EMAIL PROTECTED] wrote:
  
  
   Thanks Tino  John.
   I was hoping to get it using ClientInfo/ClientProperties class for
  this
   from
   Session.getClientInfo() as my first guess too. But I can only see
 the
   following (ie no ip address) properties:
  
   ClientProperties: {quirkIETablePercentWidthScrollbarError=true,
   proprietaryIEPngAlphaFilterRequired=true,
   quirkCssPositioningOneSideOnly=true,
   quirkIETextareaNewlineObliteration=true,
   quirkCssBorderCollapseFor0Padding=true,
   quirkCssBackgroundAttachmentUseFixed=true, quirkIERepaint=true,
   quirkCssBorderCollapseInside=true, browserInternetExplorer=true,
   browserVersionMajor=6, quirkIESelectListDomUpdate=true,
   proprietaryIECssExpressionsSupported=true,
 quirkIESelectZIndex=true,

   quirkIESelectPercentWidth=true}
  
  
  
  
   Johan Compagner wrote:
   
yes you can get it right from the httprequest
But you can also use our ClientInfo/ClientProperties class for
 this
see Session.getClientInfo()
   
   
On 5/7/07, Timo Rantalaiho  [EMAIL PROTECTED] wrote:
   
On Sun, 06 May 2007, howzat wrote:
 What is the right way in Wicket to get the ip address of the
  client?
   
We've done it by digging the HttpServletRequest from Wicket's
own request class
   
   
   
  
 
 http://wicketframework.org/apidocs/wicket/protocol/http/servlet/ServletWebRequest.html

   
but have no idea if this is the ideal way.
   
--
Timo Rantalaiho
Reaktor Innovations OyURL: http://www.ri.fi/ 
   
   
  
 
 -
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and
 take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
   
   
   
  
 
 -
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
   
   
  
   --
   View this message in context:
   http://www.nabble.com/Remote-Address-tf3701431.html#a10355023
   Sent from the Wicket - User mailing list archive at Nabble.com.
  
  
  
 
 -
   This SF.net email is sponsored by DB2 Express
   Download DB2 Express C - the FREE version of DB2 express and take
   control of your XML. No limits. Just data. Click to get it now.
   http://sourceforge.net/powerbar/db2/
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
  
  
  
 
 -
   This SF.net email is sponsored by DB2 Express
  

Re: [Wicket-user] Remote Address

2007-05-07 Thread Eelco Hillenius
 Thanks Mathias, that's exactly what I was after and it works.
 Looking at the bigger picture, is it considered to be reasonable practice in
 Wicket to cut through all its high-level abstractions, right down to the
 wire (or servlet api anyway)? I suppose an ip address is quite a low-level
 bit of info (depending on your domain).

Yep, sometime we don't expose things on purpose to prevent people from
misusing it. However, I'm not sure whether this is such a case, as I
could imagine such a method in WebRequest just fine. If you would like
that, you could always try to open up a feature request for it.

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Remote Address

2007-05-07 Thread Tauren Mills
Personally, I rarely use the IP address of the guest in my app, but I
like to log it in case I need to track something down later.  I've
seen certain use cases where you want to let the user know where they
are coming from and that the app is logging their actions.  For these
reasons, it might be nice to have it more easily accessible.

Tauren

On 5/7/07, Eelco Hillenius [EMAIL PROTECTED] wrote:
  Thanks Mathias, that's exactly what I was after and it works.
  Looking at the bigger picture, is it considered to be reasonable practice in
  Wicket to cut through all its high-level abstractions, right down to the
  wire (or servlet api anyway)? I suppose an ip address is quite a low-level
  bit of info (depending on your domain).

 Yep, sometime we don't expose things on purpose to prevent people from
 misusing it. However, I'm not sure whether this is such a case, as I
 could imagine such a method in WebRequest just fine. If you would like
 that, you could always try to open up a feature request for it.

 Eelco

 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Remote Address

2007-05-07 Thread Jeremy Thomerson

Also, take note that if you proxy your app behind a proxy server like apache
or some other front-end server, you may have to resort to this, less
desirable method:

   String ip =
getRequest().getHttpServletRequest().getHeader(X-Forwarded-For);

The aforementioned way is better, if you're not proxied.

Jeremy Thomerson

On 5/7/07, howzat [EMAIL PROTECTED] wrote:



Thanks Mathias, that's exactly what I was after and it works.
Looking at the bigger picture, is it considered to be reasonable practice
in
Wicket to cut through all its high-level abstractions, right down to the
wire (or servlet api anyway)? I suppose an ip address is quite a low-level
bit of info (depending on your domain).


mathias axelsson wrote:

 ((WebRequest) (WebRequestCycle.get().getRequest()))
 .getHttpServletRequest().getRemoteHost();

 should work I think.

 On 5/7/07, howzat [EMAIL PROTECTED] wrote:


 Thanks for the suggestion but I'm not sure I understand you properly.
 Have
 you tried that?
 ((WebRequestCycle)RequestCycle.get()).getHttpServletRequest()
 doesn't exist (1.2.6) .

 and

((WebRequestCycle)RequestCycle.get()).getRequest().getParameterMap().keySet()

 returns only:
 [previewForm:hf:0, userAnswer, wicket:interface]

 All I need is to get the ip address of the client. Has any one else had
a
 go
 at this in Wicket 1.2.6 ?





 Johan Compagner wrote:
 
  see Timo's post about the ServletWebRequest.
 
  ((WebRequestCycle)RequestCycle.get()).getHttpServletRequest()
 
  johan
 
 
  On 5/7/07, howzat  [EMAIL PROTECTED] wrote:
 
 
  As stated in my initial post I am using 1.2.6 (as there is more
 published
  material to learn from for 1.x) and plan to eventually move straight
 up

  to
  2.0 (mainly for java 5 enhancements).
  Is there a concrete code snippet somewhere that demonstrates how to
 get
  the
  user's ip address in 1.2.6 ?
 
 
 
  Johan Compagner wrote:
  
   which version do you use?
   i think that is rewritten in 1.3 and i do see remote address there
  
   johan
  
  
   On 5/7/07, howzat [EMAIL PROTECTED] wrote:
  
  
   Thanks Tino  John.
   I was hoping to get it using ClientInfo/ClientProperties class
for
  this
   from
   Session.getClientInfo() as my first guess too. But I can only see
 the
   following (ie no ip address) properties:
  
   ClientProperties: {quirkIETablePercentWidthScrollbarError=true,
   proprietaryIEPngAlphaFilterRequired=true,
   quirkCssPositioningOneSideOnly=true,
   quirkIETextareaNewlineObliteration=true,
   quirkCssBorderCollapseFor0Padding=true,
   quirkCssBackgroundAttachmentUseFixed=true, quirkIERepaint=true,
   quirkCssBorderCollapseInside=true, browserInternetExplorer=true,
   browserVersionMajor=6, quirkIESelectListDomUpdate=true,
   proprietaryIECssExpressionsSupported=true,
 quirkIESelectZIndex=true,

   quirkIESelectPercentWidth=true}
  
  
  
  
   Johan Compagner wrote:
   
yes you can get it right from the httprequest
But you can also use our ClientInfo/ClientProperties class for
 this
see Session.getClientInfo()
   
   
On 5/7/07, Timo Rantalaiho  [EMAIL PROTECTED] wrote:
   
On Sun, 06 May 2007, howzat wrote:
 What is the right way in Wicket to get the ip address of the
  client?
   
We've done it by digging the HttpServletRequest from Wicket's
own request class
   
   
   
  
 

http://wicketframework.org/apidocs/wicket/protocol/http/servlet/ServletWebRequest.html

   
but have no idea if this is the ideal way.
   
--
Timo Rantalaiho
Reaktor Innovations OyURL: http://www.ri.fi/ 
   
   
  
 

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and
 take
control of your XML. No limits. Just data. Click to get it
now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
   
   
   
  
 

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and
take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
   
   
  
   --
   View this message in context:
   http://www.nabble.com/Remote-Address-tf3701431.html#a10355023
   Sent from the Wicket - User mailing list archive at Nabble.com.
  
  
  
 

-
   This SF.net email is sponsored by DB2 Express
   Download DB2 Express C - the FREE version of DB2 express and take
   control of your XML. No limits. Just data. 

[Wicket-user] Remote Address

2007-05-06 Thread howzat

What is the right way in Wicket to get the ip address of the client?
There is an example on your examples page but the source code pop-up does
not show the java code any more.
-- 
View this message in context: 
http://www.nabble.com/Remote-Address-tf3701431.html#a10350802
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user