Variable defined in a jsp are not available in the including file
Posted on 2004-10-08
I have a header.jsp, viewBankInfo.jsp and footer.jsp.
header.jsp - has conn object in the scriplet <%Connection conn = DBMgr.getConnection(); %>
footer.jsp - should be able to close the conn "conn.close()"
ViewBankInfo.jsp - includes both header and footer. I want to use "conn" object in
<%@ include file="header.jsp"%>
<%@ include file="footer.jsp"%>
The problem is that viewBankInfo.jsp doesn't recognise variable declared in header.jsp. Isn't "include" directive allows us to use variables declared in including or included pages ?
Help would be greatly appreciated