I'm using wicket 1.5.1, couldn't figure this out.
public class MyPage extends WebPage {
public MyPage() {
String clientAddress = ...?
Client IP addresses describe only the computer being used, not the user. If multiple users share the same computer, they will be indistinguishable. Many Internet service providers dynamically assign IP addresses to users when they log in.
WebRequest req = (WebRequest) RequestCycle.get().getRequest();
HttpServletRequest httpReq = (HttpServletRequest) req.getContainerRequest();
String clientAddress = httpReq.getRemoteHost();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With