This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes Serializable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Serializable" Watch "Serializable" New topic
Author

Serializable

Ashik Uzzaman
Ranch Hand

Joined: Jul 05, 2001
Posts: 2370

In Struts Javadoc of org.apache.struts.action.ActionForm class, I found the following entry (http://struts.apache.org/api/index.html).

ActionForms are JavaBeans, subclasses should also implement Serializable, as required by the JavaBean specification.

But as we know from Java language basics, if a super class A implements an interface X, then any instance of subclass of class A, for example B that extends class A, will be automatically an instance of C as well. Then why a subclass of ActionForm should implement Serializable again as ActionFrom itself implements Serializable interface?



Ashik Uzzaman
Senior Member of Technical Staff, Salesforce.com, San Francisco, CA, USA.
 
Consider Paul's rocket mass heater.
 
subject: Serializable
 
Similar Threads
Creation of objects and serialzation
Serializable interface.
regarding the marker interface
Serialization via Inheritance
serialization question