This week's book giveaway is in the HTML/CSS/JavaScript forum.
We're giving away four copies of Practical SVG and have Chris Coyier on-line!
See this thread for details.
Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how tosend continous stream of data from servlet to jsp

 
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: 65537
108
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.
 
please buy my thing and then I'll have more money:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!