I want to check the user agent of my client. (If it's possible the browser type/version)
But I don't know how do that...
Thank you for your help.
It is OK, I have find. I use :
final HttpServletRequest request =(HttpServletRequest)FacesContext.getCurrentInstance().getExternalContext().getRequest();
final String userAgent = request.getHeader("user-agent");
System.out.println(userAgent);
Thank you for your help.
It is sent in the User-Agent
http header.
HttpServletRequest request = (HttpServletRequest)context.getExternalContext().getRequest();
String userAgent = request.getHeader("user-agent");
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