Terrance Davis wrote:
> I think a major improvement to jsp's "sesion" object would be overloaded methods for
>session's putValue method so that primatives could be used instead of JUST objects
>and have the overloaded methods convert the primatives automatically to their
>wrappers for the coder.
>
> Am I alone in this opinion?
>
Doing overloads on the putVlaue() method (now setAttribute() as of the 2.2 servlet
spec) would not be all that hard. However, what do you do about the corresponding
getValue() -- now getAttribute() -- call, which has to return an object? Overloads do
not work for return
values, so you would have to return an appropriate object type anyway. This lack of
symmetry is not good API design, IMHO.
Also, the issue you are raising is hardly unique to session data values. The same
rule applies to things stored in any Java collection (Hashtables, Vectors, and the new
JDK 1.2 collection classes) -- you must use objects. Creating an artificial lack of
consistency for
sessions only would create confusion.
>
> Is this already planned for v 1.1 of jsp?
>
No ... 1.1 is already out. In any event, this would be an issue for the servlet
specification rather that the JSP specification, because that is where the HttpSession
method calls are defined.
Craig McClanahan
===========================================================================
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