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

How to connect android app to App engine -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

php - display validation error message next to the textbox in codeigniter -