The JSP 1.1 spec section 2.12.1 explicitly says that a request time attribute value has to have the form "<%= expr %>" or '<%= expr %>'. Section 2.13.3 says that <jsp:getProperty> "... places the value of a Bean instance property, converted to a String, into the implicit out object, from which you can display the value as output." It doesn't say anything about it being equivalent to "<%= expr %>", so it would seem that this shouldn't work. However, in section 5.3.5 (the tag library descriptor) where the rtexprvalue attribute is documented, it only says "... dynamically calculated at runtime by a scriptlet expression". That would seem to me to be requiring the "<%= expr %>" syntax. So is it suppposed to work? I'd say no. Does it actually work? Depends on how the developers of your servlet engine read the spec - we'd have to construct a test and look at the generate code (assuming it gets that far).
Phil Hanna<BR>Sun Certified Programmer for the Java 2 Platform<BR>Author of :<BR><A HREF="http://www.amazon.com/exec/obidos/ASIN/0072127686/electricporkchop/107-3548162-1137317" TARGET=_blank rel="nofollow">JSP: The Complete Reference</A><BR><A HREF="http://www.amazon.com/exec/obidos/ASIN/0072124253/electricporkchop/107-3548162-1137317" TARGET=_blank rel="nofollow">Instant Java Servlets</A>
Desai Sandeep
Ranch Hand
Joined: Apr 02, 2001
Posts: 1157
posted
0
Hi Phil, Had tried this out!! Unfortunately <jsp:getProperty> action tag doesnot seem to work.I think the following is the governing criteria
However, in section 5.3.5 (the tag library descriptor) where the rtexprvalue attribute is documented, it only says "... dynamically calculated at runtime by a scriptlet expression". That would seem to me to be requiring the "<%= expr %>" syntax.
Hence the only work around (which I can think off!!) is to use the getter method instead in the expression tag, like this :