aspose file tools*
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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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: 15629
    
  15

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.
 
jQuery in Action, 2nd edition
 
subject: GenericServlet Vs HttpServlet
 
Similar Threads
need advice
Why HttpServlet implements Serializable interface
extending a class which implements Serializable
Why HttpServlet also implements Serializable?
is Serialization Inherited