The following code is in WebClientInfo's constructor:
public WebClientInfo(WebRequestCycle requestCycle)
{
super();
HttpServletRequest httpServletRequest =
requestCycle.getWebRequest()
.getHttpServletRequest();
userAgent = httpServletRequest.getHeader("User-Agent");
if (userAgent == null)
{
throw new WicketRuntimeException("unable to read header
'User-Agent'");
}
properties.setProperty(ClientProperties.REMOTE_ADDRESS,httpServletRequest.getRemoteAddr());
init();
}
If I'm not mistaken, browsers can suppress headers, amongst which the
User-Agent. Shouldn't the WebClientInfo support this?
Martijn
--
Learn Wicket at ApacheCon Europe: http://apachecon.com
Join the wicket community at irc.freenode.net: ##wicket
Wicket 1.2.5 will keep your server alive. Download Wicket now!
http://wicketframework.org