wood burning stoves*
The moose likes Servlets and the fly likes GenericServlet Vs HttpServlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "GenericServlet Vs HttpServlet" Watch "GenericServlet Vs HttpServlet" New topic
Author

GenericServlet Vs HttpServlet

Harikrishna Gorrepati
Ranch Hand

Joined: Sep 23, 2010
Posts: 422
Hi,

GenericServlet class implements Serializable interface.
HttpServlet extends Genericservlet implements Serializable interface. Becuase HttpServlet extends GenericServlet, HttpServlet will be automatically implements Serializable interface know.. Why API says HttpServlet implementes Serializable interface also. I feel it is kind of duplicate. Please advice..Thanks


OCPJP 6.0-81% | Preparing for OCWCD
http://www.certpal.com/blogs/cert-articles | http://sites.google.com/site/mostlyjava/scwcd |
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16145
    
  21

Just because a base class is serializable doesn't guarantee that a subclass might not include non-serializable elements.


Customer surveys are for companies who didn't pay proper attention to begin with.
Harikrishna Gorrepati
Ranch Hand

Joined: Sep 23, 2010
Posts: 422
Hi Tom, Can you please make your statement simple. I am not clear. Thanks
Tim Holloway wrote:Just because a base class is serializable doesn't guarantee that a subclass might not include non-serializable elements.
 
wood burning stoves
 
subject: GenericServlet Vs HttpServlet