0

in my shopping cart,logout.jsp page content does not get loaded. only a blank page comes on screen. when i see view source it is showing till onLoad="closeWarningMessage();" .It does not show any component written in body of Jsp. please suggest how to fix this. below is my logout.jsp

     <! doctype html>
     <html language="en">
    <%@  page language="java" contentType="text/html" %>
    <%@ session ="false" %>

    <head>
   <script type="text/javascript">
   function closeWarningMessage() {

     for (var i=0; i<document.forms.length; i++) {
            document.forms[i].reset();
            }
         }
     </script>
     </head>
   <body onLoad="closeWarningMessage();">// page loaded till here
     <jsp:include flush="true" page="/myCart/logoutHeader.jsp"/>
     <form>
     // form body......
     </form>
     </body>
     </html>
Raj
  • 75
  • 1
  • 9

2 Answers2

0

What happens when you use

<%@  page language="java" contentType="text/html" session ="false" %> 

Instead of using what you have in your code ?

rickz
  • 4,324
  • 2
  • 19
  • 30
0

The JSP file referenced by <jsp:include> has apparently failed with a serious exception. The servletcontainer was apparently unable to change the response to an error page to show the exception in its full glory, because the response was already committed at that point (the JSP is namely by itself part of the response).

That's one of the major payoffs of writing Java code in JSP files instead of Java classes. It makes developing and debugging so much harder, let alone maintaining. You should consider moving the business code into a servlet where you have the opportunity to run exception-sensitive business code long before presenting the results in a JSP.

Read the server's logs for the exception detail and stacktrace and fix the code accordingly.

Community
  • 1
  • 1
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
  • thanks BalusC, is there any other way to include jsp. so that it didn't show exception. please suggest something – Raj Jan 17 '12 at 07:55