Monetize with AdMob
Home / Java


Luca Passani

WURFL Java API
Java API
-  Javadocs
Download & Installation
(includes WALL)

Examples
How to Submit bug reports

License

WALL
the Wireless Abstraction Library

WALL
Tutorial (PDF)
Reference (PDF)
NEW: Cool Menus

Demos:
-  Body
-  Menu
-  Coolmenu
-  Simple Forms
-  Forms in WML Compatibility Mode
JSTL integration
-  Portal

Useful Trick

Credits

Source Code
CVS at SourceForge

Other Java/WURFL efforts
Murray Brandon:
Modified WALL

Nicholas Albion:
More Modified WALL


Bill Ray:
MyWURFL


SourceForge.net Logo
 

WURFL in action
by Luca Passani
passani at eunet dot no

Once you download and install the WURFL package, you'll find some interesting applications that show the power of WURFL in action.
Check out http://localhost:8080/wurfl/index.jsp (the URL may vary, but in that case you probably know where to look at)

WURFL Browser

The WURFL Browser lets you look at all the devices available in the WURFL. Click on a deviceID and get all the capabilities and values!


Of course, you can peek into the JSP templetes to discover that the WURFL browser is only the straightforward use of the Java API without addictives. Just look at this excerpt from wurfl.jsp

<%@ page import="java.io.*, java.util.*,net.sourceforge.wurfl.wurflapi.*" %>
<%
      ListManager lm = ObjectsManager.getListManagerInstance(); 
  :

      ArrayList deviceIdSet = lm.getDeviceIdSetSorted();
      int numberOfDevices = deviceIdSet.size(); 
      HashMap deviceElementsList = lm.getDeviceElementsList();

  :
      WurflDevice dev = null;
      Iterator keys = deviceIdSet.iterator();
      int i = 0; 
      String color = null;
      String id, ua, fb;
	while ( keys.hasNext() ) {
                String key = (String) keys.next();
                color = (i++ % 2 == 0) ? "#DDDDDD" : "white";
		dev = (WurflDevice) deviceElementsList.get(key);
		id = dev.getId(); 
		fb = dev.getFallBack();
		ua = dev.getUserAgent();
              %>

        <TR  bgcolor="<%=color%>">
            <TD width="250"><a href="viewdevice.jsp?id=<%=id%>">
                 <%=id%></a>
            </TD> 
            <TD rowspan="2" width="350" valign="top"><font size="-2">
            <%=ua%></font>
            </TD>
        </TR>
        <tr  bgcolor="<%=color%>">
            <TD width="250">      <%=fb%></TD>
        </tr>
        <tr><TD  colspan="2" height="1" width="600" bgcolor="black">
        </TD>
        </tr>
        <%}%>
 :



Copyright © 2008, Luca Passani