tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Funk <>
Subject Re: EL - access to nonexisting property, but no error ?
Date Wed, 26 Aug 2009 12:51:34 GMT
Put this in a JSP all by itself - you should get an error (or at least - 
I did):

<%request.setAttribute("aList", new java.util.ArrayList());%>

Not sure why yours did not produce an erro - a more complete snippet 
would be needed.


David BalaĹžic wrote:
> versions: Tomcat 5.5.28, Java "1.6.0_15" and Windows XP Pro SP3
> Hi!
> Can someone explain why does an EL like "${someListobject.a}" NOT give
> an error ?
> "someListobject" is an attribute of type java.util.List
> "a" is not a property of java.util.List, so according to Servlet 2.4
> specs (page I-68),
> it should cause an error.
> Also a question on the SCWCD exam asks this and the correct answer is
> "it causes an error".
> (from the book "Head First Servlets and JSP, Second Edition")
> There is also nothing to be seen in the logs. (and the page is sent to
> the client,
> with full content, no erorrs; the EL above shows up as empty string)

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message