File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Websphere and the fly likes flushing problems using out.flush() on WAS Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Products » Websphere
Reply Bookmark "flushing problems using out.flush() on WAS" Watch "flushing problems using out.flush() on WAS" New topic
Author

flushing problems using out.flush() on WAS

Sebastian Krzyzanowski
Greenhorn

Joined: Jun 17, 2002
Posts: 16
Please take a look at this simple piece of code:

<BODY>
<%
for(int i=0;i<10;i++)
{
%>
<%=i%><br>
<%
out.flush();
Thread.sleep(500);
}
%>
</BODY>

Executing it on a TOMCAT 5.0 AppServer makes it work exactly the way I want it to work - you can watch the page beeing build up step by step, one line by another.
Unfortunately the same code doesn't behave the same way on our Websphere 5.01 AppServer. Instead of building up the page line by line, you have to wait first and then the output is done all at a time.

Does anybody have a clue to this strange WAS behavior?
Tried some combinations using response.flushBuffer() as well as the "buffer" and "autoFlush" page-directives, but without success...
Sebastian Krzyzanowski
Greenhorn

Joined: Jun 17, 2002
Posts: 16
UPDATE:

Calling the JSP directly via the appropriate IP address plus AppServer SOAP-connector port (eg.: http://192.168.1.210:9089/testit.jsp) WORKS!!!

This leads me to the conclusion that it might be a
a) WebServer problem (IBMIHS 2.0.47) or
b) WebServer-to-WAS-plugin problem

I found a forum entry describing the same problem where the apache WebServer used content-encoding: gzip as default encoding which resulted in this strange behavior, but our WebServer doesn't use any mod_gzip modules...
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56185
    
  13

Moved to the Websphere forum.
[ June 22, 2005: Message edited by: Bear Bibeault ]

[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
 
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: flushing problems using out.flush() on WAS
 
Similar Threads
flushing problems using out.flush() on WAS
code block linebreak
Regarding out.flush() in <jsp:include> and <jsp:forward>
how to let javascript function recgonize java bean?
Regarding out.flush() in <jsp:include> and <jsp:forward>