And based on that information I would say don't override service().  There
is also the inefficiency of maintenance of such overriden methods by persons
not familiar with why it was done.  I think the cleaner approach is leaving
service alone - regardless of what your Weblogic instructor told you.

Dan

> ----------
> From:         Craig McClanahan[SMTP:[EMAIL PROTECTED]]
> Reply To:     Craig McClanahan
> Sent:         Tuesday, October 12, 1999 10:21 AM
> To:   [EMAIL PROTECTED]
> Subject:      Re: doPost versus doGet - DESIGN DECISION???
>
> Nanduri Amarnath wrote:
>
> > Hi Guys,
> >      I recently had WebLogic training and this Instructor said that
> instead of
> > using the
> > doGet() (or) the doPost() method,  over-write the service() method. He
> says that
> > if you use either a
> > doGet()  (or) doPost() method, the WebServer has to do a POLYMORPHIC
> lookup on
> > these methods in the
> > service() method. This will lead to a little bit of in-efficiency.
> Instead if
> > you over-write the service() method, there
> > won't be any polymorphic lookup.  I argued with him that the Java
> Servlet
> > specs..tell us not to over-write the
> > service() method, but to no avail .  Any suggestions - comments welcome.
> >
> > Cheers,
> > Amar..
> >
>
> Overriding the service() method is certainly legal Java code.  However,
> doing so
> means you give up *all* of the default processing that
> HttpServlet.service() does.
> Among other things, that includes:
>
> * Dispatching requests based on the HTTP method that
>   was requested, including rejecting those that are not
>   supported by this servlet.
>
> * Handling the "If-Modified-Since" header and calling your
>   getLastModified() method.  These techniques are used
>   to avoid re-downloading a response that has not been
>   changed.
>
> * Handling the HEAD request transparently (returns just
>   the HTTP headers instead of the entire body.
>
> Craig McClanahan
>
> ==========================================================================
> =
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> FAQs on JSP can be found at:
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to