[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
[Home]
Re: Initialising beans from an HttpRequest
Hi Tom,
tom@goodtech.co.uk wrote:
> > > I realise I can do that with request parameters, but can it also be done
> > > with specific HTTP Headers (or whatever) - so I implement a
> > > setHttpCookie() method in my bean and that does it.
> > Aha, I see. There is no automatic way for this to be done automatically
> > in JSP. You will have to call a method explicitly.
> Actually, wouldn't this be an instance where you'd make the bean implement
> the Servlet interface and you could handle such initialisations in a
> service() method (which would ensure it was only called once for any
> given instance)??
You've got a point there. Only GNUJSP does not call the service()
methods of beans. It also seems JSP 1.0 will not have that in, so I
don't think it is much use relying on this (easily implemented) feature
now.
Regards, Vincent.