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

Popular posts from this blog

java - BeanIO write annotated class to fixedlength -

Using Java 8 lambdas/transformations to combine and flatten two Maps -

How to connect android app to App engine -