>>> Peter Tierney <[EMAIL PROTECTED]> 24-Jan-00 7:17:25 AM
>>>
>If the radio wasn't checked at all the first line of output will be
>null, but if I test against that I get a NullPointerException.
> If I use:
> out.println(req.getParameterValues("radio1"));
>I get something like:
>[Ljava.lang.String;@7310a09a
>I don't need the memory address, I need the string in the memory
>address.
It's not giving you the memory address - it's really giving you an
array object. If you check the API you will see that the result of
getParameterValues() is a String[] of however many multiple values
were returned.
You might be able to achieve what you want by simply:
String radio=req.getParameterValue("radio_button_id");
if(radio==null || radio.length()<1)
{
//radio didn't come back so set it to "no" or something
}
else
//radio did come back so carry on...
>This is something that should be simple and it's making me want to
stay
>with Perl, if Servlet development is this peculiar.
Trouble is they come at it from completly different ends of the
field. I've used both and can honestly say that servlets are better
than any Perl solution currently available (until multi-threaded Perl
gets into mod_perl).
>Thanks for ANY help given.
Our pleasure.
Nic Ferrier
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html