hello ranchers,
I am studying
JSP EL topic and facing a peculiar problem. I am running a simple JSP as shown below
<%@ page isELIgnored = "false" import= "java.util.*" %>
<BODY>
<%
ArrayList list=new ArrayList();
list.add("hi");
list.add("hello");
request.setAttribute("list",list);//adding list to request
%>
${list[3]}//EL to dispaly the list from above
<%
//ArrayList list1=(ArrayList)request.getAttribute("list");
//out.println(list1.get(3));
%>
From the above code I thought it will throw IndexOutOfBoundsException,but it is showing blank page as output. If I access the attribute by uncommenting below lines,it throws right exception.
//ArrayList list1=(ArrayList)request.getAttribute("list");
//out.println(list1.get(3));
Is it container specific? I am using
tomcat 5.5
Pls help me in understanding this behaviour