tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Tomcat <>
Subject Re: How to get debug info
Date Fri, 31 May 2002 07:31:12 GMT
On Thursday 30 May 2002 19:06, you wrote:
> I have the follwing
> -- File1.jsp --
> <%
> code
> %>
> <html>
> <body>
> <jsp:inlcude page="File2.jsp" flush="true />
> </body>
> </html>
> How do I get the error info from File2.jsp?  And does File2.jsp inherit
> objects from File1.jsp?

File2.jsp will inherit the same Request, Response, and ServletContext objects 
from File1.  If you need to pass something to File2, I would probably just 
use response.setAttribute("foo", myObject);.  I'm not sure what you mean "how 
do I get the rror from File2?"

I'm sure you've heard it all before, but, in general, having lots of code in 
your jsp pages is considered bad form for many reasons.  I find that I can 
acomplish 100% of what I want to do with well-designed tags, filters and 
servlets.  One thing to do is to have a filter which does all the processing 
the page will need (validates form elements, loads stuff from db, etc) and 
then set those results as objects in the Request object.  Then have a series 
of tags which display whatever is needed by getting the filter's objects from 
the Request object.

I hope this helps.

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message