Temperature SPOT - Part 3
Posted by mriem on August 20, 2007 at 11:00 PM EDT
The following web page shows you how easy it is once the
JSF component has been written to access the SunSPOT and
get the temperature out of it using JSF.
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@taglib prefix="temperature" uri="http://www.manorrock.com/tld/jsf/sunspot/temperature"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<f:view>
This will show you the temperature outside at the location where
this server is located: <temperature:temperature sunspotId="0014.4F01.0000.062B"/>
</f:view>
</body>
</html>
In order for this to work you will need the following classes:
TemperatureComponent, TemperatureTag and
TemperatureRenderer. Over the course of the next few days
i'll post those classes. Related Topics >>
Blog Links >>
- Login or register to post comments
- Printer-friendly version
- mriem's blog
- 475 reads





