aspose file tools
The moose likes JSP and the fly likes Real time data using JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSP
Reply 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://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Real time data using JSP
 
Similar Threads
HttpServletRequest.getReader() returns nothing
client could not get update session data
Urgent, please help, reading remote Data
Purchase Request and layers
bring RMI and sockets