diff --git a/upnp.sample.binaryLight/src/main/java/org/apache/felix/upnp/sample/binaryLight/Activator.java b/upnp.sample.binaryLight/src/main/java/org/apache/felix/upnp/sample/binaryLight/Activator.java
index 4da4ac8..ebd8146 100644
--- a/upnp.sample.binaryLight/src/main/java/org/apache/felix/upnp/sample/binaryLight/Activator.java
+++ b/upnp.sample.binaryLight/src/main/java/org/apache/felix/upnp/sample/binaryLight/Activator.java
@@ -21,9 +21,13 @@
 
 import java.util.Dictionary;
 
+import javax.servlet.Servlet;
+
 import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
 import org.osgi.framework.ServiceRegistration;
+import org.osgi.service.http.HttpService;
 import org.osgi.service.upnp.UPnPDevice;
 
 
@@ -36,6 +40,7 @@
 	static BundleContext context;
 	private ServiceRegistration serviceRegistration;
 	private LightDevice light;
+	private HttpService httpServ;
 	
 	/**
 	 * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
@@ -43,8 +48,10 @@
 	public void start(BundleContext context) throws Exception {
 		Activator.context = context;
 		doServiceRegistration();
+		doServletRegistration();
 	}
 
+
 	private void doServiceRegistration() {
 		light = new LightDevice(context);
 		Dictionary dict = light.getDescriptions(null);
@@ -55,6 +62,35 @@
 				dict
 			);
 	}
+	
+	private void doServletRegistration() {
+        ServiceReference sr = context.getServiceReference(HttpService.class.getName());
+        if (sr != null){
+        	httpServ = (HttpService) context.getService(sr);
+        	
+            try
+            {
+             Servlet presentationServlet = new PresentationServlet(light.getModel());
+             httpServ.registerServlet("/upnp/binaryLight", presentationServlet,null, null);
+            }
+            catch (Exception e)
+            {
+                System.err.println("Exception registering presentationServlet:" + e);
+            }
+            
+            
+            try
+            {
+                httpServ.registerResources("/upnp/binaryLight/images",
+                        "/org/apache/felix/upnp/sample/binaryLight/images", null);
+            }
+            catch (Exception e)
+            {
+                System.err.println("Exception registering /resource:" + e);
+            }
+
+        }		
+	}
 
 	/**
 	 * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
diff --git a/upnp.sample.binaryLight/src/main/java/org/apache/felix/upnp/sample/binaryLight/LightDevice.java b/upnp.sample.binaryLight/src/main/java/org/apache/felix/upnp/sample/binaryLight/LightDevice.java
index f7c3e04..85bca3f 100644
--- a/upnp.sample.binaryLight/src/main/java/org/apache/felix/upnp/sample/binaryLight/LightDevice.java
+++ b/upnp.sample.binaryLight/src/main/java/org/apache/felix/upnp/sample/binaryLight/LightDevice.java
@@ -19,6 +19,8 @@
 
 package org.apache.felix.upnp.sample.binaryLight;
 
+import java.net.InetAddress;
+import java.net.UnknownHostException;
 import java.util.Dictionary;
 import java.util.Properties;
 
@@ -52,6 +54,9 @@
 		buildEventNotifyer();
 	}
 
+	public LightModel getModel(){
+		return model;
+	}
 	/**
 	 * 
 	 */
@@ -75,7 +80,16 @@
 		dictionary.put(UPnPDevice.MODEL_NAME,"Lucciola");
 		dictionary.put(UPnPDevice.MODEL_NUMBER,"1.0");
 		dictionary.put(UPnPDevice.MODEL_URL,"http://incubator.apache.org/felix/lucciola");
-		dictionary.put(UPnPDevice.PRESENTATION_URL,"http://incubator.apache.org/felix/lucciola/presentation");
+		String port = context.getProperty("org.osgi.service.http.port");
+        InetAddress inet;
+		try {
+			inet = InetAddress.getLocalHost();
+	        String hostname = inet.getHostName();
+            //String hostname = inet.getHostAddress();
+		dictionary.put(UPnPDevice.PRESENTATION_URL,"http://"+hostname + ":"+port+"/upnp/binaryLight/");
+		} catch (UnknownHostException e) {
+			System.out.println("Warning: enable to cacth localhost name");
+		}
 		dictionary.put(UPnPDevice.SERIAL_NUMBER,"123456789");
 		dictionary.put(UPnPDevice.TYPE,"urn:schemas-upnp-org:device:BinaryLight:1");
 		dictionary.put(UPnPDevice.UDN,DEVICE_ID);
diff --git a/upnp.sample.binaryLight/src/main/java/org/apache/felix/upnp/sample/binaryLight/PresentationServlet.java b/upnp.sample.binaryLight/src/main/java/org/apache/felix/upnp/sample/binaryLight/PresentationServlet.java
new file mode 100644
index 0000000..288253f
--- /dev/null
+++ b/upnp.sample.binaryLight/src/main/java/org/apache/felix/upnp/sample/binaryLight/PresentationServlet.java
@@ -0,0 +1,87 @@
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.felix.upnp.sample.binaryLight;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+class PresentationServlet extends HttpServlet
+{
+	LightModel model;
+
+    public PresentationServlet(LightModel model) {
+		this.model = model;
+	}
+
+	public void init()
+    {
+		//ServletConfig config = getServletConfig();
+        System.out.println("BinaryLight Servlet init called:" );
+    }
+
+    public void destroy() {}
+
+
+
+    public void doGet(HttpServletRequest request, HttpServletResponse response)
+        throws IOException, ServletException
+    {
+        String path = request.getPathInfo();
+        if (path != null){
+	        if (path.equals("/On"))
+	        	model.switchOn();
+	        else if (path.equals("/Off"))
+	        	model.switchOff();
+        }
+        response.setContentType("text/html");
+        PrintWriter out = response.getWriter();
+        out.println("<HTML>");
+        out.println("<head><title>Apache Felix UPnP BinaryLight</title></head>");
+        out.println("<body>");
+        out.println("  <center>");
+        out.println("  <h1><font face='Arial' color='#808080'>Apache Felix UPnP BinaryLight</font></h1>");
+       
+        if (model.getStatus()== false){
+        	out.println("  <p><a href=/upnp/binaryLight/On><img border='0' src='images/LightOff.gif' width='64' height='64'></a></p>");
+        }
+        else{       	
+        	out.println("  <p><a href=/upnp/binaryLight/Off><img border='0' src='images/LightOn.gif' width='64' height='64'></a></p>");
+        }
+        
+        out.println("  <p><a href=/upnp/binaryLight/>Refresh status</a></p>");
+        out.println("  </center>");
+        out.println("  </BODY>");
+        out.println("</HTML>");
+        out.flush();
+    }
+
+
+    public void doPost(HttpServletRequest request, HttpServletResponse response)
+        throws IOException, ServletException
+    {
+        doGet(request, response);
+    }
+
+}
