I created the site in JSF 2 (primefaces 3.3), and now I want to create a mobile version. I have different views on the desktop / mobile. I am already creating a custom handler for detecting mobile browsers. It works great. But I don’t understand how to redirect the user to mobile pages. I searched a lot, and no one says where this step is. At what stage should I do this? Redirect user and how?
Performing a browser discovery job in Filterappears on FacesServletinstead ViewHandler.
Filter
FacesServlet
ViewHandler
Then it's just like
if (needsRedirectToMobileURL) { response.sendRedirect(mobileURL); } else { chain.doFilter(request, response); }
A ViewHandler /. JSF .
, , css media, css.
http://css-tricks.com/resolution-specific-stylesheets/