java - Wicket: Get Browser Information -
how information browser in java/wicket/maven project?
greetings
you can capture browser information using following code
getapplication().getrequestcyclesettings().setgatherextendedbrowserinfo(true);
webclientinfo w = (webclientinfo)getwebrequestcycle().getclientinfo(); clientproperties cp = w.getproperties();
// data cp.getnavigatorappname();
cp.getnavigatorappcodename();
cp.getnavigatorappversion();
cp.getbrowserversionmajor();
cp.getbrowserversionminor();
exerpt taken wicket documentation
edit updated comments.
the above code wicket 1.4.x. newer versions of wicket replace getwebrequestcycle() getrequestcycle()
Comments
Post a Comment