File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dynamic page content using out.flush()

 
Jan Ivanov
Greenhorn
Posts: 19
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi !

I need to show a progress in my servlet.
I have a form and input type text in which I want to show the percentage stage of my process.


Here is sample code:



Why it's not working. I get on the screen only last step of the iteration ?

Pls help Me !!

[ July 20, 2006: Message edited by: input output ]
[ July 20, 2006: Message edited by: Jan Ivanov ]
 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mr Output
Please read the Naming Policy of the ranch first.
http://www.javaranch.com/name.jsp

Thank you.
 
Jan Ivanov
Greenhorn
Posts: 19
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Reading Naming Policy is done
 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It seems a bit weird to send <script> tags to the client and to hope for the page to be updated.
I've never looked into that, but did you try to search about Pushlets ?
 
Jan Ivanov
Greenhorn
Posts: 19
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It works only if page has only that one form in BODY tag.
If I put that form in TABLE it won't work. (???)
I think that problem is in out.flush().
I don't know how does it work. When I should call this method ?
 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Really ?
did you try this way :
 
Jan Ivanov
Greenhorn
Posts: 19
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It works now !
Have to close all TABLES tags before calling flush.
Very strange.

Thanks a lot !
 
Hayk Baghdasaryan
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


This code must work

[ July 20, 2006: Message edited by: Hayk Baghdasaryan ]
[ July 20, 2006: Message edited by: Hayk Baghdasaryan ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic