This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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: 423
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: 17038
    
  26

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


An IDE is no substitute for an Intelligent Developer.
Harikrishna Gorrepati
Ranch Hand

Joined: Sep 23, 2010
Posts: 423
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.
 
Have you checked out Aspose?
 
subject: GenericServlet Vs HttpServlet
 
It's not a secret anymore!