users@glassfish.java.net

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

From: Dan Kaplan <dank_at_mirthcorp.com>
Date: Wed, 12 Mar 2014 10:03:12 -0700

Yeah that makes sense, but just for my own curiosity, why didn't GF2/3
care? How did GF4 become more strict?


On Tue, Mar 11, 2014 at 6:21 PM, Martin Gainty <mgainty_at_hotmail.com> wrote:

>
> ------------------------------
> 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.
>



-- 
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.