Hi,
I am using Jakarta tomcat 5.0.24 on Windows 2000.
I have 2 files, 1.jsp which includes 2.jspf
Content of 1.jsp
<%
pageContext.setAttribute("aaa", "111");
System.out.println("in 1.jsp: " + pageContext.getAttribute("aaa"));
%>
<jsp:include page="2.jspf"/>
<%
System.out.println("after, in 1.jsp: " +
pageContext.getAttribute("aaa"));
%>
Content of 2.jspf
<br>
22222
<%
System.out.println("\n\n\n\n");
System.out.println("in 2.jspf: " + pageContext.getAttribute("aaa"));
//String s = null;
//s.length();
pageContext.setAttribute("aaa", "2222");
%>
3333
The strange thing is that when 1.jsp is run, the System.out.println from
2.jspf is not shown in the tomcat console.
Also when the 2 lines
Stirng s = null;
s.lenght();
is uncommented, the NullPointerException stack trace is not shown in the
tomcat console too. (If we copy the 2 lines to 1.jsp, we will be able to see
the stacktrace.)
Is this a bug?
- Jim
************************************************************************
The information in this email is confidential and is intended solely
for the addressee(s).
Access to this email by anyone else is unauthorized. If you are not
an intended recipient, please notify the sender of this email
immediately. You should not copy, use or disseminate the
information contained in the email.
Any views expressed in this message are those of the individual
sender, except where the sender specifically states them to be
the views of Capco.
http://www.capco.com/
************************************************************************