Mark,
a Bean extending HttpServlet is what the JSP 0.91 Spex talks about:
---cut
Also if the bean happens to implement the Servlet interface, the service
method of the servlet is called for each request and the init method is
called once per creation.
---cut
So its not doing a servlet's work, but it gets called like a servlet; hence
you won't use it as a servlet but as a bean.
if you do it that way, your bean can get hold of the page's request object
and it can, for example, get the session... not so bad, I think. E.g. in a
site with user login, how would you instantiate a Bean that represents the
user for that session? Without a ServletBean, you'd need some ugly Snippet
(at least on).
On the other side, under 0.92 the situation is a bit different, I think: the
JSP page can pass its request object via <setoncreate> (or the session
itself), so there is another way to get there without a ServletBean with
0.92.
bye, Werner
> -----
> Mark,
>
> I don't think you should be creating beans that extend
> HttpServlet. Extend
> HttpServlet to create a servlet that you use to populate a bean
> (which might
> extend an object like Vector or Hashtable for example), and then pass the
> bean to the JSP file (setAttribute / <BEAN>) so that it can be
> referenced as
> you wish.
>
> That's the model we use. It isn't the only way.
>
> Dan
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".