Mantis - Resin
Viewing Issue Advanced Details
3023 major always 10-24-08 05:03 12-15-08 15:53
vicsanca  
ferg  
normal  
closed 3.1.6  
fixed  
none    
none 4.0.0  
0003023: JSTL and empty cookies fails
The first time you look with jstl if a cookie is empty/exists server gives nullpointerexception.
Example code working in Tomcat:

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" [^] %>
<c:if test="${empty cookie.kk}">
    kk cookien don't exists
</c:if>

Error in resin

java.lang.NullPointerException
    at com.caucho.jsp.el.CookieFieldExpression.getValue(CookieFieldExpression.java:76)
    at com.caucho.el.ValueExpr.getValue(ValueExpr.java:90)
    at com.caucho.el.UnaryExpr.evalBoolean(UnaryExpr.java:141)
    at _jsp._vic._test__jsp._jspService(vic/test.jsp:2)
    at com.caucho.jsp.JavaPage.service(JavaPage.java:61)
    at com.caucho.jsp.Page.pageservice(Page.java:578)
    at com.caucho.server.dispatch.PageFilterChain.doFilter(PageFilterChain.java:195)
    at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:187)
    at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:266)
    at com.caucho.server.hmux.HmuxRequest.handleRequest(HmuxRequest.java:435)
    at com.caucho.server.port.TcpConnection.run(TcpConnection.java:678)
    at com.caucho.util.ThreadPool$Item.runTasks(ThreadPool.java:721)
    at com.caucho.util.ThreadPool$Item.run(ThreadPool.java:643)
    at java.lang.Thread.run(Thread.java:619)


Notes
(0003648)
ferg   
12-15-08 15:53   
jsp/315o