• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Real time data using JSP

 
Ranch Hand
Posts: 469
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 455
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic