That should be fine.  Buffer your data on the server side and "chunk" it
down, and you should be OK.

-----Original Message-----
From: rapture_soon2002 [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 04, 2005 9:18 AM
To: svg-developers@yahoogroups.com
Subject: [svg-developers] Re: servlet and getURL()



Ok guys - I'll be less ambitious; I'll choose an update rate of 500ms.
I'm show getURL can handle this

--- In svg-developers@yahoogroups.com, "rapture_soon2002" 
<[EMAIL PROTECTED]> wrote:
> 
> 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 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