Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

HELP! Include (with flush=true) and errorPage problem

843835Jun 12 2003 — edited Jun 18 2003
I already posted this problem here twice... both times people told me to use this waitpage solution http://www.javaworld.com/jw-12-1998/jw-12-servlethtml-p2.html.

After trying everything, I finally decided to give it a shot... well, for my surprise, it DOESN'T WORK.

Let me see if I can be very clear explaining it this time...

I have a servlet called Manager.. this is the servlet which every page calls to access another page... (example: /Manager?show=login) it recieves a parameter "show"... then after processing some stuff it passes this parameter to another page called model.jsp, like this:
context.getRequestDispatcher("/model.jsp?content="+show+".jsp").include(request, response);
to show the requested page.
This page (model.jsp) is a static HTML page which prints the header and the system menu, AND includes the the JSP received as a parameter (content), so that everypage has a header and a menu.

the include tag used is <jsp:include page="<%=content%>"/>

now the problem...

all the JSPs have and errorPage set... and it works ok. BUT it has a weird behaviour, and it conflicts with the INCLUDE's output flushing...

If I leave the include tag alone (meaning, flush=false) the system runs OK, and the page transitions are normal... by normal I mean that when I click or submit something, it waits for the entire page to be loaded then shows it (and while this is happening nothing changes in the current page), normal, right? But if an error occurs in the included page (passed as the "content" parameter) the error page is displayed using the whole browser area, disreggarding the header and menu which for some reason are not disaplyed.

If I set flush="true" in the include tag, the errorPage is displayed correctly INSIDE the structure built by model.jsp (with header and menu), BUT whenever I click or submit something I get an all white blank waiting screen while the page loads, which is REALLY annoying.. some pages take a lot of time to load... this all-white screen really gives the impression that the system crashed or something.

The waiting-page solution kinda inherits the behaviours described above... with flush=false the waiting page is displayed very nicely while the processing is done and the page loads, then the page is shown. With flush=true the waiting page is displayed for a second, then the all-white screen shows for the rest of the loading time until the page loads. It did no good at all.

I think there's no solution for this problem. I'd like at least to know why it happens. Anyone?

Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 16 2003
Added on Jun 12 2003
3 comments
533 views