[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
[Home]
Re: Initialising beans from an HttpRequest
What's a BEAN? In 25 words or less . . . :)
eric
-----Original Message-----
From: Vincent Partington <vincentp@xs4all.nl>
To: tom@goodtech.co.uk <tom@goodtech.co.uk>
Cc: gnujsp@server.gjt.org <gnujsp@server.gjt.org>
Date: Monday, January 25, 1999 9:30 AM
Subject: Re: Initialising beans from an HttpRequest
>Hi Tom,
>
>tom@goodtech.co.uk wrote:
>> I'm currently developing a bean which needs to be initialised with a
value
>> from the current HttpRequest. Specifically, it's a shopping basket type
>> bean which needs a cookie value so it can read in user-specific details
of
>> the basket from a database.
>>
>> Is there an easy way of passing this in the <BEAN> tag? At the moment,
I'm
>> using the tag and calling an init(req) function to initialise it in the
>> JSP source, but I'd rather avoid this...
>
>You could set the introspect attribute of the <BEAN> tag to true. That
>way, the request parameters will be copied to the bean properties
>automatically. This mechanism will be replaced by a more fine grain
>system in JSP 1.0.
>
>Regards, Vincent.