File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Need for servlet serialization 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 "Need for servlet serialization" Watch "Need for servlet serialization" New topic
Author

Need for servlet serialization

Java Green
Greenhorn

Joined: Sep 07, 2004
Posts: 7
Why the servlets need to implement Serializable interface.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

"Java Green"-
Welcome to the JavaRanch! Please adjust your displayed name to meet the

JavaRanch Naming Policy.

You can change it

here.

Thanks! and welcome to the JavaRanch!

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Julian Kennedy
Ranch Hand

Joined: Aug 02, 2004
Posts: 823
I think this is a fairly FAQ. I would guess that the answer is that if Servlet didn't implement Serializable then it wouldn't be able to be serialized. It only needs to implement Serializable if it needs to be serialized. The question then becomes why would you need to serialize a Servlet. I don't know the answer to that and, perhaps, neither did the original developers. Maybe the decision was taken to implement Serializable in case some valid reason for serializing a Servlet materialized. After all, there are no obvious adverse effects of this implementation.

Jules
Peter den Haan
author
Ranch Hand

Joined: Apr 20, 2000
Posts: 3252
See this thread for the answer.

- Peter
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need for servlet serialization
 
Similar Threads
a serializable problem.
ejb 2
Eclipse & MS JVM
Is the Spring:Bind tag needed for display only data?
Clarifications