27 Mar


filter fpr detect device and redirect to mobile pages

replace the following:

1. viewhandler
2. @sessionscoped @postconstruct

with the following:

servlet/http filter that uses

HttpServletRequest req = (HttpServletRequest) context.getExternalContext().getRequest();
String userAgent = req.getHeader("user-agent");
String accept = req.getHeader("Accept");

if (userAgent != null && accept != null) {
UserAgentInfo agent = new UserAgentInfo(userAgent, accept);
if (agent.isMobileDevice()) {






read the following


and read that entire
blog post?

> a for desktop version
> a for mobile version
> and how you detect the device and user agent for forward at specific
> version of web jsf application ( desktop or mobile version) ?

searching google for mobile device mobile desktop

I found the following:

Mobile Device

Desktop/mobile application problem

read those [entire] forum topics



Standard way to detect mobile browsers in a web application based on the http request



vedere 3 modi di impostare il renderkit a primefacesmobile

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: