To gain a little bit of perspective you have to look at the generic Servlet
API. The only real thing that a generic Servlet can do is init, destroy,
and service which are all empty methods in the GenericServlet. When the
HttpServlet was added, the service method was implemented to be a request
dispatcher. That means that if you are implementing your own subclass of
GenericServlet you will want to override service and implement it to do
something intelligent for your protocol. But, if you override HttpServlet's
service method you have basically just turned your HttpServlet into a
GenericServlet, since most of the brains of HttpServlet are contained in
service.
(*Chris*)
----- Original Message -----
From: Steven J. Owens <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 16, 1999 7:01 PM
Subject: Re: Still having Problem with POST FORM
> Okay, from the top... :-)
>
> > > I wrote:
> > > > > said "this is bad" but I've never actually heard a coherent,
cogent
> > > > > explanation of why it's bad. [ ... ]
>
> (some messages later)
> Milt replies:
> > This is one of the first things that I read when I started doing
> > servlets. It's mentioned in Jason Hunter's book, and I suspect most
> > servlets books. It says right there in the API docs "Notice that the
> > service method is not typically overridden". No, they didn't go into
> > a lot of detail about why this is recommended practice, [...]
>
> Which was pretty much what I was complaining about to begin with :-).
> Regardless, this thread has been interesting to read, and I now understand
> some of the concrete reasons to avoid overriding service, to summarize:
>
> a) it's a pain if you later want to subclass your servlet and
> customize the behavior for doGet vs. doPost,
>
> b) it interferes with doPut, doDelete, doOptions, doTrace and
> getLastModified, if you should ever happen to want those in a subclass.
>
> On the whole, I think the conversation would have been shorter if
> service was named something more descriptive of what it actually does,
> like "dispatchRequest", but maybe that's just aesthetics.
>
> Steven J. Owens
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html