File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
RabbitMQ in Depth
this week in the
Why is HttpServlet Serializable?
Joined: Jan 29, 2005
Jul 04, 2007 09:38:00
They seem to live forever in the container, never travel outside of it. I have not noticed they have to be persisted either. So why is the need for serialization?
I appreciate your opinions.
We must know, we will know. -- David Hilbert
Joan Horta Tosas
Joined: Feb 01, 2007
Jul 04, 2007 15:00:00
I'm not sure, but I think it's to allow the container to persist their state and "suspend/resume" them according to their use, pooling, etc... I can't think of another reason.
Joined: Mar 06, 2001
Jul 04, 2007 18:45:00
I agree. Here's the link:
subject: Why is HttpServlet Serializable?
is Serialization Inherited
HttpServlet implementing Serializable
Why HttpServlet implements Serializable interface
GenericServlet Vs HttpServlet
extending a class which implements Serializable
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015