This question is related to my earlier post ..

The following code snippet also throws a NullPointerException if both
"cookie" and "someParam" are emtpy.  It seems to me that testing for empty
on cookie.someParam shouldn't cause an exception, even if cookie is empty?
Of course I don't know what the spec says, but I have seen countless
examples like this.

<%--
        Causes "[Show] java.lang.NullPointerException" and won't render the
page if cookie evaluates to empty 
--%>
<c:if test="${!empty cookie.someParam}">
        ...
</c:if>

Do I really have to verify if cookie is empty in a separate test?

-----Original Message-----
From: resin-interest-boun...@caucho.com
[mailto:resin-interest-boun...@caucho.com] On Behalf Of Scott Ferguson
Sent: Friday, February 06, 2009 3:32 PM
To: General Discussion for the Resin application server
Subject: Re: [Resin-interest] Resin 3.0/3.2 Inconsistency


On Feb 6, 2009, at 1:21 PM, Aaron Freeman wrote:

> Under Resin-3.0.x the following code works whether I pass in a  
> 'email' param
> or not.  However on Resin 3.2.1, which I just installed .. It throws  
> an
> exception if an 'email' param wasn't passed in. However it works  
> great if I
> do pass an email param in.  Any thoughts?

Unfortunately, that exception is required by the JSTL specification,  
and Resin 3.2 is stricter about spec compliance.

-- Scott




_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to