dotMobimobiThinkingmobiForgemobiReadyDeviceAtlasgoMobi

Posted by kumarprabhatn 2 years 20 weeks ago

pic
 kumarprabhatn
mobiForge Newbie
Posts: 1
Joined: 2 years ago
[offline]

Hi there.. I m using new WURFL java API but I m having problems in detecting the IE6 browser. I get "goodaccess_ver1_submsiepocketpc" as the device id. Here is my code

package wurfl;
 
import java.io.*;
 
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
 
import net.sourceforge.wurfl.core.CapabilityNotDefinedException;
import net.sourceforge.wurfl.core.Device;
import net.sourceforge.wurfl.core.MarkUp;
import net.sourceforge.wurfl.core.WURFLHolder;
import net.sourceforge.wurfl.core.WURFLManager;
 
/**
 * Servlet implementation class for Servlet: Wurfl_class
 * 
 */
public class Wurfl_class extends javax.servlet.http.HttpServlet implements
		javax.servlet.Servlet {
	/*
	 * (non-Java-doc)
	 * 
	 * @see javax.servlet.http.HttpServlet#HttpServlet()
	 */
	public Wurfl_class() {
		super();
	}
 
	protected void doPost(HttpServletRequest request,
			HttpServletResponse response) throws ServletException, IOException {
		WURFLHolder wurflHolder = (WURFLHolder) getServletContext()
				.getAttribute("net.sourceforge.wurfl.core.WURFLHolder");
 
		WURFLManager wurfl = wurflHolder.getWURFLManager();
 
		Device device = wurfl.getDeviceForRequest(request);
 
		MarkUp markUp = device.getMarkUp();
 
		String jspView = null;
		String deviceID = device.getId();
		if (MarkUp.XHTML_ADVANCED.equals(markUp)) {
			jspView = "XHTML_ADV";
		} else if (MarkUp.XHTML_SIMPLE.equals(markUp)) {
			jspView = "XHTML_SIMPLE";
		} else if (MarkUp.CHTML.equals(markUp)) {
			jspView = "CHTML";
		} else if (MarkUp.WML.equals(markUp)) {
			jspView = "WML";
		}
        PrintWriter pw= response.getWriter();
        pw.println(jspView+"<br>"+deviceID);
	}
}

I have added all required XMLs n taglibs. IE7, IE8 are detected properly. But not IE6. Any solution ??

Posted by nachoburton 2 years ago

pic
 nachoburton
mobiForge Newbie
Posts: 4
Joined: 4 years ago
[offline]

You should probably try posting that one to the wmlprogramming forum on Yahoo.