I have following JSTL tag in one of the JSPs:
<c:forEach items="${customerList}" var="cust" varStatus="current">
customerList has been set as session as well as request attribute in 2 different JAVA files:
JAVA file 1 gets called first which has following code:
WebUtils.setSessionAttribute(request, "customerList", VAR1);
After that JAVA file2 gets called which has this:
request.setAttribute("customerList", VAR2);
Then, the JSP is called which refer customerList as stated initially. Now my question is, whether the JSP will take customerList value as VAR1 OR VAR2?
I think it will take VAR1 as it's set in bigger scope i.e. 'session' as compared to 'request'; even if request attribute is set later.
What do you think?
Thanks in advance!!