Access variable of parent jsp in included JSP
Posted on 2004-09-17
I have a JSP (A.jsp) which contains a variable declared like this :
<%! String returnToAction="abc"; %>
Now I include another JSP in this by writing
<jsp:include page="../common/B.jsp" flush="true"/>
In B.jsp I want to access the variable declared in A.jsp,the code is as follows
<a href="/tradeability/edit_payment_info?fromPaymentReturnTo=<%= returnToAction %>"> Edit Payment Information</a>
This does not compile and says that unresolved symbol returnToAction.
Can anybody suggest wats wrong with that.