• Post Reply Bookmark Topic Watch Topic
  • New Topic

how tosend continous stream of data from servlet to jsp  RSS feed

 
joy chirag Sharma
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Hi all,

Please help me out.

I need to show the real time logs as and when they come.
i have a method which is returning the line by line logs i just need to pass on these line continously to the jsp to give real time look and feel



Above method onOutput get called for every line of logs and as its thread based mplementation i don't have control on it the textline.just need to pass the line to jsp.,Just like a stream of text

Can any one please help on this or let me know some approach to do this .

Thanks in advance
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You seem to have the wrong idea about JSP. A JSP just makes an HTML page - if you want that HTML page to get updated you need to have an active process on the browser handling it. Typically this would be JavaScript and the technique is called AJAX.

The fact that this HTML page was created by a JSP is irrelevant! Once the page is on the browser, the JSP is no longer involved.

Bill

 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66144
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please read this article to understand these concepts.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!