File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes ActionForm subclasses have to implement Serializable? 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 » Frameworks » Struts
Bookmark "ActionForm subclasses have to implement Serializable?" Watch "ActionForm subclasses have to implement Serializable?" New topic
Author

ActionForm subclasses have to implement Serializable?

Bob Watson
Greenhorn

Joined: Dec 04, 2003
Posts: 4
Hello everyone,
In Jakarta struts API ActionForm, there is a sentence -- "Because ActionForms are JavaBeans, subclasses should also implement Serializable, as required by the JavaBean specification."
If I create my own super Form like this:
public abstract class MyGeneralActionForm extends ActionForm { ... }
it will still work. My question is -- do we have to implement Serializable?
Thanks a lot!
Rick Hightower
Author
Ranch Hand

Joined: Feb 20, 2002
Posts: 350
ActionForm API docs
Get the API docs. Get the source. Documents sometimes lie. Source code and API docs do not.

In short, no you don't have to implement java.io.Serializable because it is done by the super class.


Rick Hightower is CTO of Mammatus which focuses on Cloud Computing, EC2, etc. Rick is invovled in Java CDI and Java EE as well. linkedin,twitter,blog
 
 
subject: ActionForm subclasses have to implement Serializable?
 
Similar Threads
making subclasses serializable necessary?
ActionForm
Serializable
Serializable Action Forms? Why?
Serialization via Inheritance