Re: Display Updated/changed value(from cache) in JSP



On Jan 30, 8:34 pm, "gwoodho...@xxxxxxxxx" <gwoodho...@xxxxxxxxx>
wrote:
There is a timer running.

I'm not sure if you have tried this but;

Why not create a javascript timer, one that sends a request to a
servlet every few seconds/minutes (depending on your capacity/server
load). In this way the response could give the value of the field you
need.

Ive done something similar in the past, but at a previous company so i
can't copy paste code im afraid. I managed it with the references at
w3schools. Great site that.

Hope that helps,

Graeme


Hi,

thanks for your replies.
make periodic requests to the server (via AJAX is
Well, thats the point. Assume 5 browsers have established a session
with the web server.
now 1 of them has bid his amount, whcih is, changed the current price
value. THIS, can be posted to the server.Also can be done using AJAX.
However, I would also want to update the rest of the 4 browsers with
the latest update of the price.

Why not create a javascript timer, one that sends a request to a
servlet every few seconds/minutes (depending on your capacity/server
load). In this way the response could give the value of the field you
need.

The seconds part is what I also thought about; because this is a
auction site and all users got to be updated asap. However, I am
afraid, I dont know if it is a good solution.
Wont it increase the traffic, slow down the performance and restrict
the number of users I can have ?
I have heard a lot of stock tickers work the same way. Any clue on how
they function ?


thanks

.



Relevant Pages

  • Re: calling a stylesheet from a servlet..
    ... /css/ subdirectory from the context root. ... >in same dir as servlet and call it accordingly from servlet that would ... allows to be directly accessible to browsers. ... see the relative stylesheet link in the HTML generated by the servlet. ...
    (comp.lang.java.help)
  • Re: calling a stylesheet from a servlet..
    ... >>in same dir as servlet and call it accordingly from servlet that would ... > allows to be directly accessible to browsers. ... > see the relative stylesheet link in the HTML generated by the servlet. ...
    (comp.lang.java.help)