In section 2.13.2.1 of the JSP 1.0 specification where the syntax of
<jsp:setProperty name="x" property="y" param="z"/> is documented, the
following appears:
---------------------- snip -------------------------
property
The name of the Bean property whose value you want to set.
If you set propertyName to * then the tag will iterate over the
current ServletRequest parameters, matching parameter names
and value type(s) to property names and setter method type(s), setting
each matched property to the value of the matching parameter. If a
parameter has a value of "" , the corresponding property is not
modified.
---------------------- snip -------------------------
I am confused by the last sentence in this spec (if a parameter has a
value of "" [which I presume to mean the empty string], the
corresponding property is not set). This is apparently a changed
behavior between JRun 2.3.3 build 155 and build 157.
Does this rule only apply when property="*" or does it apply for ALL
specified property names? In other words, to pick up empty form
elements do I simply need to break out my
<jsp:setProperty name="bean" property="*" />
to
<jsp:setProperty name="bean" property="formElem1" />
<jsp:setProperty name="bean" property="formElem2" />
. . .
or do I need to write special code to handle form elements that the user
could have deliberately (and reasonably) emptied out, such as the second
line of an address?
Thanks for any input...
-=- D. J.
===========================================================================
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