try {
final RequestData requestData = requestUtil.getRequestData(request);
final WURFLHolder wurfl = (WURFLHolder) ctx.getBean("wurflHolder");
final WURFLManager manager = wurfl.getWURFLManager();
Device device = manager.getDeviceForRequest(request);
String deviceFolder = "default";
if (device != null) {
boolean isSmartPhone = BooleanUtils.toBoolean(device.getVirtualCapability("is_smartphone"));
boolean isIPhoneOs = BooleanUtils.toBoolean(device.getVirtualCapability("is_iphone_os"));
boolean isAndroid = BooleanUtils.toBoolean(device.getVirtualCapability("is_android"));
if (isSmartPhone || isIPhoneOs || isAndroid) {
deviceFolder = "mobile";
}
}
requestUtil.updateCurrentDevice(requestData, deviceFolder);