>>> Nicholas Whitehead <[EMAIL PROTECTED]> 16-Jan-00 4:02:36 PM >>>

>2 ways;
>1. Have *only* a service method.
>2. Redirect the get() to the post().
>e.g.


There is a 3rd way, have both doPost and doGet call a 3rd method.

This "3rd way" is my preferred option (Hey! I sound like Tony Blair!)
because it allows extension of the servlet to take on board slightly
different behaviour in the 2 main methods without a problem (eg:
adding getLastModified support).

Overriding service() is IMHO a bad thing to do (most of the time)
since it also prevents use of stuff like getLastModified. As the
servlet API expands (eg: to take on webdav functions) the amount of
hidden work that service() does may increase, any servlet overriding
the method won't get the benefit.


Nic Ferrier

___________________________________________________________________________
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

Reply via email to