How to use high accuracy mode without spring beans?

SmileyDoots
Posts: 2
Joined: Fri Feb 22, 2013 1:58 pm

How to use high accuracy mode without spring beans?

Postby SmileyDoots » Fri Feb 22, 2013 2:00 pm

Hello,

Successfully setup WURFL using the servlet/web.xml configuration. However, it defaults to using the high performance mode.

Is there a way, without using the Spring Beans configuration, to enable high accuracy mode instead?

SmileyDoots
Posts: 2
Joined: Fri Feb 22, 2013 1:58 pm

Re: How to use high accuracy mode without spring beans?

Postby SmileyDoots » Fri Feb 22, 2013 4:28 pm

Actually, figured it out. It's the 4th line down...

Code: Select all

ServletContext context = getFilterConfig().getServletContext();
WURFLHolder wurfl = (WURFLHolder) context.getAttribute(WURFLHolder.class.getName());
WURFLManager manager = wurfl.getWURFLManager();
manager.setEngineTarget(EngineTarget.accuracy);
Device wurflDevice = manager.getDeviceForRequest(request);

kamermans
Posts: 393
Joined: Mon Jun 06, 2011 9:50 am

Re: How to use high accuracy mode without spring beans?

Postby kamermans » Sat Feb 23, 2013 4:12 pm

I'm glad you found the answer - thanks for posting!
Thanks,

Steve Kamerman
ScientiaMobile

Make sure you check out our WURFL Cloud, WURFL InSight and WURFL InFuze products!

fulvio.crivellaro
Posts: 38
Joined: Tue Jan 31, 2012 10:27 am

Re: How to use high accuracy mode without spring beans?

Postby fulvio.crivellaro » Mon Feb 25, 2013 3:25 am

Hello,
actually if you want to configure it without Spring, and without doing it programmatically, you can also modify the config file.

It is located inside the lib, under the META-INF folder, and it is named wurfl-config.xml.
In the released version, at line 13, you can substitute

Code: Select all

<wurfl-api-config engine-target="performance">
with

Code: Select all

<wurfl-api-config engine-target="accuracy">


Who is online

Users browsing this forum: No registered users and 73 guests