I'm not sure that you can - off the top of my head the generated code is
out.write(getMyProp().toString())
You could return an empty string instead?
Kevin
-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Bill Lynch
Sent: 06 January 2000 19:22
To: [EMAIL PROTECTED]
Subject: <jsp:getProperty/> and returning null
Does anyone know how to return null values in a bean (or how to handle
them gracefully). I'm using a bean that queries a database and some of the
records may be null. however when i do:
<jsp:getProperty ... />
and it returns a null value from the specified property, I get a 'null
pointer exception.'
Thanks in advance,
--Bill
Bill Lynch -- [EMAIL PROTECTED]
4charity.com -- http://www.4charity.com
University of Iowa -- http://www.cs.uiowa.edu/~bmlynch
CoolServlets.com -- http://www.coolservlets.com
----------------------------------------------------------
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html