TCLUG Development Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TCLUG-DEVEL:261] JSP and Bean constructors



Quoting Perry Hoekstra (dutchman@uswest.net):
> No, only default constructors are allowed.  This is because beans used
> in JSPs must follow the JavaBean contract (empty constructors, implement
> Serializable). 

I thought as much. Thanks.

BTW, any good Bean books you can recommend?

> Create the bean:
> <jsp:useBean id="foo" scope="session" class="foo.myBean" />
> 
> and then call a method (like initialize) on the bean that takes a
> Properties parameter right after the bean definition.
> <% mybean.initialize(config); %>

That is exactly what I am doing. :-) Thanks again.

-- 
Bob Tanner <tanner@real-time.com>       | Phone : (952)943-8700
http://www.mn-linux.org                 | Fax   : (952)943-8500
Key fingerprint =  6C E9 51 4F D5 3E 4C 66 62 A9 10 E5 35 85 39 D9