The Most Exciting Mobile Community on the Planet

Download Latest WURFL
Last Updated: November 12, 2009
What's a Patch File?
Web Patch(recognize web browsers)

Deploying WURFL
Introducing the new smarter PHP and Java APIs *
Java
WALL (old WALL on new API)
WNG - WALL Next Generation
PHP
(preview .Net version, still much better than anything produced before)
(*) The new APIs are distributed with a GPL License.


TRAC: report bugs/CRs
Using TRAC to report bugs and requests changes
WURFL API (Java, PHP, .Net)
WNG
WALL (new retrofitted WALL lib)

Documentation
!!! Capabilities !!!
Video Testing

About WURFL
What's the WURFL?
What can the WURFL
  do for me?

What's so smart
  about the WURFL?

WURFL and UAProf
Voices from the Net
WURFL Pronunciation

FAQ

Contributions & Attributions
WURFL-based apps
WURFL Endorsements
WALL-based apps
License
Get Involved!
Contribute Device Info

WURFL Utilities
Utilities, uaprofile2wurfl.pl, Alembik, mDevInf, Thumbnails, Wallify, Image Server, Tera-WURFL, GAIA Trascoder, Mobile Web Toolkit, PHP Image Rendering Library, PHP Image Rendering Library (II), FastWurfl, Apache Mobile Filter

Credits



Luca Passani

Old APIs
(too be deprecated and removed)
Old Java API and WALL
Perl
Ruby
Python
XSLT Tools
C++ tools

Luca Passani is a Forum Nokia Champion

SourceForge.net Logo

http://www.mobilopen.org/

http://tinurl.mobi/

http://www.mob4hire/
Crowdsourced Mobile Application Testing
 

WURFL FAQ, Part 3: WURFL and Java
by Luca Passani
passani at eunet dot no




Q: I'm a Java programmer. How can I use WURFL?
A:  You need to download and install the WURFL API package available at http://wurfl.sourceforge.net/java/installation.php.

At the time of this writing the WURFL API and the WALL library are bundled together (the jars are small enough to make bundling an advantage when people ask for support: only one version to track).
Examples of usage of the Java API can be found in the package itself.

The Openwave Developer Site is publishing articles and tutorials about WURFL and WALL here: http://developer.openwave.com/dvl/tools_and_sdk/wurfl_and_wall/




Q: What's the role of the WURFL API Java Classes
A:  This page pretty much tells you all you need to know to get started: http://wurfl.sourceforge.net/java/api.php.




Q: How do I tell my application where it can find the WURFL?
A:  If you download and install the WURFL API package, the wurfl.xml file in the "/WEB-INF/" directory will be used. You can download new versions of wurfl.xml from the website and simply overwrite the one which comes with the package.

If you need to place wurfl.xml in another location for any reason, click here for instructions on how this can be achieved.




Q: Which utilities are available with the WURFL API package?
A:  The WURFL API package ships with a few utilities:
  • WURFL Browser: list all devices in the WURFL as a human readable table. Click on device to browse capabilities for that device.
  • UA Search tool: retrieve Device ID out of UA string
  • List of Actual devices
  • WURFL Filter: build a WURFL versions that only contains the capabilities you care about.
  • WALL examples





Q: How do I access the list of Actual Devices?
A:  Look for actualdevices.jsp and actualdevices2.jsp in the download package to see how the API allows this.




Q: How do I deploy a Wurfl or WALL-based application?
A:  There is nothing different from deploying any other Java application. If you download the standard packafe for Tomcat and follow the instructions, you should have no problem.




Q: I have problems using WALL/the API with Tomcat, Apache and connectors...
A: My understanding is that there is a huge number of configurations when you try to make Tomcat and Apache play together through one of the many under-documented connectors. I will add information about specific issues here as users report them. For the time being, here is how one user reported that he was unable to make the Wurfl API package work as described (Apache won't find the tld files and jar libs), but he managed to work around the problem:
          
-----------------------------------------------------------------------------------
From: Darren Luckett


luca wrote:

>Darren Luckett wrote:
>  
>
>>hmm, if you have a standalone instance of tomcat them the unzipping into 
>>/wurfl folder is the best. if you have apache 
>>linked to tomcat on a shared server its not so good. if you only have 
>>webapps/root then
>>    

>
>Darren, I am not sure I understand this configuration. Can you explain?
>
>Apache linked to Tomcat? how? through a connector? which one? which ways?
>
>If I understand this configuration, maybe I can also understand
>how common it really is and how to optimize Wurfl/WALL installation for that
>configuration.


hello luca,

yes, using mod_jk as the apache to tomcat connecter. heres my live server 
config:

Server: Apache/1.3.29 Sun Cobalt (Unix) mod_jk mod_ssl/2.8.4 OpenSSL/0.9.7d 
 PHP/4.3.7  mod_auth_pam_external/0.1 FrontPage/5.0.2.2510 
 mod_perl/1.26  (Apache Tomcat/4.1.30)

the server is a shared box so root access isnt avaialbe. instead ftp access 
is to the equalivant of tomcat/webapps/ROOT. I did some research into this 
problem over the last year with other commercial isp jsp hosting companies 
and they offer the same - unless i wanted to host my own server - 
then obvioulsy i could do as i liked.

This means that i was unable to deploy the wurfl as a webapp - not having access 
to the folder one level up from /ROOT. so the workaround solution, and a better 
one as wurfl and wall is now available to all files within my /ROOT was

1. copy c, wurfl, wall.tlds into /ROOT/WEB-INF/tld
2. copy wurfltags.jar, standard.jar, wurfltags.jar, xom-1.0.jar
3. download xerces the java.sun.com site -
4. extract and copy the xercesImpl.jar to the /lib file
3. copy wurfl.xml and renamed a_wurfl_patch.xml to WEB-INF/
4. make a copy of the live servers /WEB-INF/web.xml  and rename 
   the copy to web.xml.old.
5. copy the wurfl specfic content of the wurfl web.xml into the 
   exisitng /WEB-INF/web.xml
6. copy the wurfl classes to WEB-INF/classes


and hey bingo! it worked. is also tried deploying as a .war as my server 
has a web interface that allows that. did that didnt work and was a waste 
of time anyway. i wouldnt recommend the war option.

darren

luca wrote:
-----------------------------------------------------------------------------------
        






Copyright © 2007-2009, Luca Passani