Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Display message while loading heavy image

 
Mohd Fuzail
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know this can be done using HTML/Java Script.

But my question is can we achieve the same functionality using JSP/Servlet ONLY?. I have spend some time already without any success.

I started working on the pre-assumption that response.flushBuffer() will send the partial response to the client while server loads the image. But Image is never loaded only partial response is displayed.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64631
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSP executes on the server in order to format the HTML response to send to the client. Client-side activity must occur using HTML and JavaScript.

Perhaps this article will be helpful.

But Image is never loaded only partial response is displayed.

You are not going to be able to force the browser to do what you want. Use the right tool for the job.
[ June 03, 2008: Message edited by: Bear Bibeault ]
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you looking for something like this ?

http://weblog.404creative.com/index.php/2007/07/21/emuate-ajax-image-loading-with-css/

of course its just a fancy way of saying please wait.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64631
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That still uses client-side technology and may or may not appear when the OP wants. It's not under the control of the server, or anything that can be done via JSP.
 
Mohd Fuzail
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Roger that.. thanks for the clarification.. i was missing the essence here... JSP/Servlet is for server side not client side.

Thanks for emphasizing it again
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic