I just need to display the browser name and its version on a <h:outputText/> in the user’s homepage. Can we achieve this via JSF 2.0?
Mojarra 2.0.4 – Primefaces 2.2.1- glassfish v3
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There are as far as I know no JSF components which does that with a single tag or something. The easiest what you can do is just displaying the raw HTTP
User-Agentheader.This is only a large and ugly string which is not always decipherable to everyone.
There are however APIs which can convert a HTTP
User-Agentheader into useable information, such as the exact browser make/version and platform make/version, such as useragentstring.com.Once converted the
User-Agentheader into useable parts with help of such an API, you must be able to display the parts of interest in JSF with help of a managed bean the usual way.