public boolean preHandle(javax.servlet.http.HttpServletRequest request,
HttpServletResponse response, Object handler) throws Exception {
final String mobil = "detectedDevice";
final Device device = deviceResolver.resolveDevice(request);
final UserAgentStringParser parser = UADetectorServiceFactory.getResourceModuleParser();
final UserAgent agent = parser.parse(request.getHeader("User-Agent"));
log.trace("user agent --->" + agent.toString());
request.setAttribute("so", agent.getOperatingSystem().getFamily());
request.setAttribute("bo_vendor", agent.getProducer());
request.setAttribute("agent_type", agent.getTypeName());
request.setAttribute("agent_name", agent.getName());
request.setAttribute("agent_family", agent.getFamily());
request.setAttribute("agent_pro_url", agent.getProducerUrl());
request.setAttribute("bo_vendor_ver", agent.getVersionNumber().getMajor());
final Boolean enabledMobileDevice = EnMePlaceHolderConfigurer
.getBooleanProperty("application.mobile.enabled");
final Boolean forceMobileDevice = EnMePlaceHolderConfigurer
.getBooleanProperty("application.mobile.only");
log.trace(" enabledMobileDevice => "+enabledMobileDevice);