This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript 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?