http://java.sun.com/products/jsp/tags/11/syntaxref1115.html
read above.
----- Original Message -----
From: "Michael Ni" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, March 15, 2003 7:51 PM
Subject: javabean constructors
> can someone explain to me how contructors work with java beans in a jsp
> page? heres my question, in the following bean foo1 which does not have a
> constructor, if i usebean and then getA, i can get the value of 3
>
> class foo1 {
> int a = 3;
> int b = 4;
>
> //the rest of the get and set methods....
> getA() {
> return a;
> }
> }
>
> but....
> in foo2 if i usebean and then getA, the constructor is not setting the
> values of a and b to the right value. a and b are left as null. How in a
> jsp page do i active the constructor. I always assumed when you usebean
it
> activates the constructor.
>
> class foo2 {
> int a;
> int b;
>
> foo2() {
> a = 3; b = 4;
> }
>
> //the rest of the get and set methods....
> getA() {
> return a;
> }
> }
>
> mike
>
>
>
> _________________________________________________________________
> Add photos to your e-mail with MSN 8. Get 2 months FREE*.
> http://join.msn.com/?page=features/featuredemail
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]