Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Pillai, Arumugam
Sent: dinsdag 16 mei 2000 22:55
To: [EMAIL PROTECTED]
Subject: CHECK-BOX
Hi there,
When i call
request.getParameterValues("chkbox")
and if no chkbox is selected, it
Hi there,
When i call
request.getParameterValues("chkbox")
and if no chkbox is selected, its throwing a java.lang.NullPointerException
error.How should i handle this.
Thanks in advance.
===
To unsubscribe: mailto
you can put in a conditional to see if request.getParameter("chkbox") equals null.
"Pillai, Arumugam" wrote:
Hi there,
When i call
request.getParameterValues("chkbox")
and if no chkbox is selected, its throwing a java.lang.NullPointerException
error.How should i handle this.
Catch the exception and default it?
-Mike
--
From: Pillai, Arumugam[SMTP:[EMAIL PROTECTED]]
Reply To: A mailing list about Java Server Pages specification and
reference
Sent: Tuesday, May 16, 2000 1:54 PM
To: [EMAIL PROTECTED]
Subject: CHECK
The call to request.getParameterValues("chkbox") should be returning
null, not throwing an exception.
Anyway, if you want to make sure you have a non-null array with 0 or
more elements, you could write a scriptlet like:
%
String[] chkboxes;
if( request.getParameter("chkbox") == null ) {