This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Need for servlet serialization" Watch "Need for servlet serialization" New topic

Need for servlet serialization

Java Green

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

Joined: Feb 05, 2001
Posts: 17249

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

JavaRanch Naming Policy.

You can change it


Thanks! and welcome to the JavaRanch!


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.

Peter den Haan
Ranch Hand

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

- Peter
It is sorta covered in the JavaRanch Style Guide.
subject: Need for servlet serialization
Similar Threads
a serializable problem.
Eclipse & MS JVM
Is the Spring:Bind tag needed for display only data?
ejb 2