IE user -agent

How to identify the different user agent values for browsers in ADF Faces

Place the below sample code in your application to receive the user agent values for diffent browsers like safari, chrome ,IE , Mozilla public String getUserAgentValue() { FacesContext facesCtx = FacesContext.getCurrentInstance().getCurrentInstance(); ExternalContext externalctx = facesCtx.getExternalContext(); HttpServletRequest request = (HttpServletRequest)externalctx.getRequest(); String userAgentVal = null; userAgentVal=request.getHeader(“User-Agent”); userAgentVal=userAgentVal.toLowerCase(); if (userAgentVal != null && userAgentVal.indexOf(“iphone”) > -1) { userAgentVal […]

Scroll to top
Copy Protected by Chetan's WP-Copyprotect.