wood burning stoves 2.0*
The moose likes JSP and the fly likes Real time data using JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Real time data using JSP" Watch "Real time data using JSP" New topic
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
    
    5
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]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Real time data using JSP
 
Similar Threads
Purchase Request and layers
bring RMI and sockets
client could not get update session data
HttpServletRequest.getReader() returns nothing
Urgent, please help, reading remote Data