users@glassfish.java.net

RE: Why am I getting NullPointerExceptions in my JSPs when I upgrade from Glassfish 3 to 4?

From: Martin Gainty <mgainty_at_hotmail.com>
Date: Tue, 11 Mar 2014 21:21:52 -0400

  




Date: Tue, 11 Mar 2014 14:11:13 -0700
Subject: Why am I getting NullPointerExceptions in my JSPs when I upgrade from Glassfish 3 to 4?
From: dank_at_mirthcorp.com
To: users_at_glassfish.java.net



From: http://stackoverflow.com/questions/22331998/why-am-i-getting-nullpointerexceptions-in-my-jsps-when-i-upgrade-from-glassfish


I upgraded from Glassfish 3 to 4 and now my JSPs are throwing NPEs. I haven't changed any code so it must be a difference in Glassfish. JSP code that used to look like this:


    <c:when test="${invoke}">
 
MG>you're throwing Null code into a web server and you are expecting the Server to catch it
MG>as they say in New England...you're skating on thin ice my friend ..and its March!

Now gives me a NPE unless I change it to this:


    <c:when test="${not empty invoke && invoke}">


I'm wondering why this change is necessary. Can someone tell me what caused this? Why did it used to work before and no longer works?


These NPEs only seem to occur in .tag files. I'm not sure if that's a coincidence or relevant.

-- 
Thanks,
Dan 
CONFIDENTIALITY NOTICE: The information contained in this electronic transmission may be confidential. If you are not an intended recipient, be aware that any disclosure, copying, distribution or use of the information contained in this transmission is prohibited and may be unlawful. If you have received this transmission in error, please notify us by email reply and then erase it from your computer system.