David Mossakowski wrote:
> Yes you can call *any* class and use it's methods with
> jsp:usebean tag. Beans are just classes. But that is not
> always recommended plus it can lead to problems later on if
> you use things like a hashtable as the bean itself. It's
> always better to encapsulate that hashtable in some object
> of your own whose name will be more meaningful.
>
> dave.
>
There are two conventions in the JavaBeans spec (highly recommended reading!) that are
important
to classes you use as beans in JSP pages:
* If you want the JSP page to create an instance of your
bean if it is not there already, you must provide a
no-arguments constructor. If your bean is created
some other way (such as in a servlet) this does not
matter.
* The <jsp:getProperty> and <jsp:setProperty> calls will
only work if your method names follow the standard
naming conventions for property getters and setters.
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