aspose file tools*
The moose likes JSP and the fly likes Display message  while loading heavy image Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Display message  while loading heavy image" Watch "Display message  while loading heavy image" New topic
Author

Display message while loading heavy image

Mohd Fuzail
Ranch Hand

Joined: Feb 20, 2002
Posts: 107
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.


Being defeated is often a temporary condition. Giving up is what makes it permanent.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61764
    
  67

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 ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6662
    
    5

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.


SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61764
    
  67

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

Joined: Feb 20, 2002
Posts: 107
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Display message while loading heavy image