You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Dave Jones <dj...@ix.netcom.com> on 2003/04/24 22:13:54 UTC

problem with page display after migrating to Tomcat 4.1.24

Hi,
I'd like to try this request for help again (still stuck after trying 4.1.24).

I've run into a problem migrating an application from Tomcat 3.3 
to 4.1.24. Briefly, the problem is that my JSP pages, which 
include several jsp:include tags, stop displaying at the first 
include when an exception is thrown by a later include.

Example:
<body>
<html>
<table>
         <tr><td>        <----- (A)
         <jsp:include page="header.jsp" flush="true" />
         </td></tr>

         <tr><td>
         <jsp:include page="body.jsp" flush="true" />
         </td></tr>
</table>
</body>
</html>

body.jsp contains html, jsp scriptlets and tags and calls to beans.

If body.jsp does not throw an exception, the page displays fine. 
However, if body.jsp throws an exception, the page only displays 
up to point A above.

If I remove the include tag for header.jsp, a stack trace is 
displayed (as expected).

If I replace the include tag with code from the included 
header.jsp, a stack trace is displayed (as expected).

The problem only occurs when a) an exception is thrown from 
body.jsp and b) the header code is included via jsp:include 
instead of placed in-line.

Can anyone shed some light on this?

TIA,
Dave Jones
NetEffect

Re: problem with page display after migrating to Tomcat 4.1.24

Posted by Dave Jones <dj...@ix.netcom.com>.
Reihard,
I appreciate the response. I've tried using try-catch in the jsp 
page, but the interruption in the display of the page is 
occurring before the try block is reached.

Also, as I mentioned, the application works fine in Tomcat 3.3, 
so I hate to have to retrofit all the jsp pages with a try-catch 
block just to hack around a problem with 4.1.24.

Dave Jones
NetEffect


At 10:49 PM 4/24/03 +0200, you wrote:
>Hi,
>
>you could catch the exception in body.jsp and display it as nicely as you
>want.
>Simply put a try { } catch () { } around your code.
>
>I think the include-semantics have some specialties with exceptions.
>You can circumvent those as described above.
>
>Cheers,
>
>Reinhard
>
>Am Donnerstag, 24. April 2003 22:13 schrieb Dave Jones:
> > Hi,
> > I'd like to try this request for help again (still stuck after trying
> > 4.1.24).
> >
> > I've run into a problem migrating an application from Tomcat 3.3
> > to 4.1.24. Briefly, the problem is that my JSP pages, which
> > include several jsp:include tags, stop displaying at the first
> > include when an exception is thrown by a later include.
> >
> > Example:
> > <body>
> > <html>
> > <table>
> >          <tr><td>        <----- (A)
> >          <jsp:include page="header.jsp" flush="true" />
> >          </td></tr>
> >
> >          <tr><td>
> >          <jsp:include page="body.jsp" flush="true" />
> >          </td></tr>
> > </table>
> > </body>
> > </html>
> >
> > body.jsp contains html, jsp scriptlets and tags and calls to beans.
> >
> > If body.jsp does not throw an exception, the page displays fine.
> > However, if body.jsp throws an exception, the page only displays
> > up to point A above.
> >
> > If I remove the include tag for header.jsp, a stack trace is
> > displayed (as expected).
> >
> > If I replace the include tag with code from the included
> > header.jsp, a stack trace is displayed (as expected).
> >
> > The problem only occurs when a) an exception is thrown from
> > body.jsp and b) the header code is included via jsp:include
> > instead of placed in-line.
> >
> > Can anyone shed some light on this?
> >
> > TIA,
> > Dave Jones
> > NetEffect
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: problem with page display after migrating to Tomcat 4.1.24

Posted by Reinhard Moosauer <rm...@moosauer.de>.
Hi,

you could catch the exception in body.jsp and display it as nicely as you 
want.
Simply put a try { } catch () { } around your code.

I think the include-semantics have some specialties with exceptions. 
You can circumvent those as described above.

Cheers,

Reinhard

Am Donnerstag, 24. April 2003 22:13 schrieb Dave Jones:
> Hi,
> I'd like to try this request for help again (still stuck after trying
> 4.1.24).
>
> I've run into a problem migrating an application from Tomcat 3.3
> to 4.1.24. Briefly, the problem is that my JSP pages, which
> include several jsp:include tags, stop displaying at the first
> include when an exception is thrown by a later include.
>
> Example:
> <body>
> <html>
> <table>
>          <tr><td>        <----- (A)
>          <jsp:include page="header.jsp" flush="true" />
>          </td></tr>
>
>          <tr><td>
>          <jsp:include page="body.jsp" flush="true" />
>          </td></tr>
> </table>
> </body>
> </html>
>
> body.jsp contains html, jsp scriptlets and tags and calls to beans.
>
> If body.jsp does not throw an exception, the page displays fine.
> However, if body.jsp throws an exception, the page only displays
> up to point A above.
>
> If I remove the include tag for header.jsp, a stack trace is
> displayed (as expected).
>
> If I replace the include tag with code from the included
> header.jsp, a stack trace is displayed (as expected).
>
> The problem only occurs when a) an exception is thrown from
> body.jsp and b) the header code is included via jsp:include
> instead of placed in-line.
>
> Can anyone shed some light on this?
>
> TIA,
> Dave Jones
> NetEffect


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org