Header Ads

  • Breaking Now

    Why do GenericServlet and HttpServlet class implement Serializable interface?

    In order to support HTTP session states, all servlet session data must be serializable.Moreover, servlets need to communicate over the network to Java objects(e.g. in Applet-Servlet communication),in such scenarios it becomes necessary to enable serialization of objects' states through implementation of Serializable interface.This is the way GenericServlet and HttpServlet classes have been designed by their designers to make them capable of serialization.

    No comments

    Post Top Ad

    Post Bottom Ad