db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ronald Rudy <ronchal...@gmail.com>
Subject Re: refresh JSP webpage when Derby DB is changed
Date Fri, 12 Feb 2010 16:23:23 GMT
This isn't really a Derby question, it's more of a web/Javascript question.

There is no way to push data to a client.  The request always originates on the client.

That said, IF you are so inclined you can use Ajax type calls to poll a servlet on the server
on a regular interval to check for updates.  It would still be polling, though.  Not event-based.

I would look at prototype if you want to start leveraging Ajax.  http://www.prototypejs.org/
  It's a good place to start.

I would be very careful about having JS continuously polling your server though.  If you have
lots of clients you will end up with lots of requests to handle.  That code has to be very

On Feb 12, 2010, at 11:17:22 AM, albertkao wrote:

> The goal is to refresh a JSP web page on a web browser when the Derby DB on
> the server is changed.
> The rate of database change is 1-10 times per hour.
> The record size is about 1000 bytes.
> The user use the browser to modify the data and write back to the Derby DB.
> The web server is tomcat.
> I am thinking of comet programming - pushing data from the server to client
> when the Derby DB is changed.
> Is that a good idea?
> How to do that with javascript or java?
> Any sample code or tutorial? 
> -- 
> View this message in context: http://old.nabble.com/refresh-JSP-webpage-when-Derby-DB-is-changed-tp27565891p27565891.html
> Sent from the Apache Derby Users mailing list archive at Nabble.com.

View raw message