| Author |
Real time data using JSP
|
Angela D'souza
Ranch Hand
Joined: Jan 16, 2002
Posts: 469
|
|
Hi, I want to get realtime updated data from database using socket listener object so user on front end doesn't have to click on refresh button to display updated data. Can I get real data using JSP(which will call socket listener object which call data access object)? Thanks, angela
|
 |
Rajeev Ravindran
Ranch Hand
Joined: Aug 27, 2002
Posts: 455
|
|
hi angela, why r u going for sockets in JSP ?? cant u refresh the jsp page automatically and call a bean to display the database value dynamically ?? thanks raj.. SCJP2
|
SCJP, SCWCD, SCBCD, Oracle Certified Professional (SQL n PL/SQL)
|
 |
Lasse Koskela
author
Sheriff
Joined: Jan 23, 2002
Posts: 11962
|
|
Originally posted by Angela D'souza: Can I get real data using JSP(which will call socket listener object which call data access object)?
Listening a socket for a long time in the middle of a HTTP request is generally a bad idea... If the client doesn't timeout the connection, your appserver will. I'd suggest using some kind of polling scheme. The first that comes to mind is the HTML refresh header already suggested.
|
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
|
 |
 |
|
|
subject: Real time data using JSP
|
|
|