"Dynamic" JSP?
1 posts in topic
Flat View  Flat View

Posted By:   Anonymous
Posted On:   Wednesday, August 9, 2006 11:55 PM

Hi All,

I have an application that I converted from J2SE into JSP form. It employs a console-like JTextArea which I used to simply append to. Now I replaced it with an iframe that supposedly does the same thing. It supposed to do some processing, and prints out stage by stage what it is doing. However, it appears that JSP cannot do that. Instead, it completes every processing job before printing out all the stages at one go. and in the interim period the page looks like its loading or hanging. Is there any way to make JSP print out line by line?

Re: "Dynamic" JSP?

Posted By:   Robert_Lybarger  
Posted On:   Thursday, August 10, 2006 08:03 PM

Sounds like you don't understand that JSP is just building a single response page to a browser request and sending that response when it is finished? Of course the client side looks like it is hanging, if it hasn't been sent a full page yet. If you need intermittent data, you'll need to rig the response page to reload periodically (either by meta-refresh or a javascript timer event) and/or use something like AJAX to query for the current status and update some little page object. Given you said "iframe", you might be leaning toward a javascript timer-based page reload of just the iframe. I don't really have additional details about how to make that work.
About | Sitemap | Contact