aspose file tools*
The moose likes JSP and the fly likes Different section of JSP page loads with time lag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Different section of JSP page loads with time lag" Watch "Different section of JSP page loads with time lag" New topic
Author

Different section of JSP page loads with time lag

Rohit Kejriwal
Greenhorn

Joined: Oct 05, 2012
Posts: 6
I have a JSP page that starts with some static contents, then there are lot of dynamic content. when ever the link to this JSP is clicked the static content is displayed first and after some time (with some time lag) the rest of the section (having dynamic content) is displayed. I understand that dynamic content is loaded late because there are lot of server side processing. But I need a solution to load the whole page at the same time. I do not want the user to first see the static content with the other section as white page and then after some time the rest of the page loaded. Is there a way to get the whole page loaded at the same time? I am using IE 8 and above. Thanks in advance for your help.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61198
    
  66

Rohit Kejriwal wrote:I understand that dynamic content is loaded late because there are lot of server side processing.

Nope. The dynamic content is processed on the server, and the resulting HTML is sent as the response. The static content doesn't get sent first and other stuff later on as it is processed. So the whole concept of "late loading" is a red herring and does not exist.

How are you structuring the page?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Rohit Kejriwal
Greenhorn

Joined: Oct 05, 2012
Posts: 6
Thanks Bear Bibeault for the response. I have a jsp were within the HTML body tag I include another jsp header.jsp with static contents. Then there are html table were other jsp's are included one after another. All this jsp's uses lot of customised tag library. Page is quite big with lots of content. But i am not fetching any record from data base. Header.jsp shows up on the sceen and after some delay rest of the section is displayed. I want to get rid of this delay.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61198
    
  66

Can't help with the scant information that you've supplied. It could be that the large content is just buffering, of could be that complicated content is causing the browser to display things in an odd fashion. Have you observed this behavior in multiple browsers?
Stefan Evans
Bartender

Joined: Jul 06, 2005
Posts: 1018
How long is the delay we are talking about here? a few seconds? 10 seconds? 30 seconds? minutes!?!?
How large is the content of the "static" area on the page?

If your static section is > 8k, you might try
<%@ page buffer="16kb" />

This just increases the amount of memory used to store the resulting jsp page before it has to start writing it out to the browser.
That wouldn't make the page any faster to display, just might mean that the header gets displayed at the same time.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Different section of JSP page loads with time lag