[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index] [Home]

Re: Initialising beans from an HttpRequest


"A reusable software component that can be manipulated visually in a
builder tool" according to the JavaBeans API spec...

Self-describing modules of code is how I think of them (but I'm just
starting out on em...)

On Tue, 26 Jan 1999, Eric B. Ridge wrote:

> 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.
> 
> 

---
tom@goodtech.co.uk
Good Technology ltd.                           http://www.goodtech.co.uk/