I need a eg 

Hi guys,
I'm trying to implement a very simple getURL (SVG) to pull sensor 
data from a servlet and display it every millisec or so. Below is a 
sketchy idea of what I have in mind. 

How I can I implement a simple getURL()? Will it be something like

<svg ...........>
<script .......><![CDATA[


  function acquire() {
   getURL('/servlet/sensorservlet',fn)
  }

  function fn(obj) { 
   setTimeout('acquire()',1)
  }

]]></script>
</svg>


Thanks for your help.
---------------------------------------------------------------


private int data;    //data holds sensor value

public class Sensor extends HttpServlet
{

  public void init(ServletConfig config) throws ServletException

  {
    super.init(config);
    
    MyMonitor Monitor = new MyMonitor();  //data acquisition class 
instantiated
    
    data= Monitor.start();  //method polls sensor for data

  }  //end of init


  protected void doGet(HttpServletRequest req, HttpServletResponse 
res)
  
  {

    res.setContentType("text/html");
    res.setHeader("pragma", "no-cache");
    ServletOutputStream out = res.getOutputStream();
    

    out.print("<HTML><HEAD><TITLE>Sensor  
Data</TITLE>/head>");              
        
    out.print("Sensor Data<BR>");

    out.print(data);

    -
    -
    - 
    out.print("</HTML>");

    out.close()


  } //end of doGet


}  // end of Sensor Class





-----
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my 
membership"
---- 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/svg-developers/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to