You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Sebastian Stein <se...@hpfsc.de> on 2005/12/12 21:31:45 UTC

What should I do with serializable classes?

I have several classes derived either from ValidatorForm or ActionForm. Both
classes mark my derived class as serializable. I get a compiler warning
about a missing serialVersionUID.

Why are those classes serializable, because data transfered through a
network connection? How do I have to handle this warning? Should I just
define a dummy serialVersionUID?

Sebastian

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: What should I do with serializable classes?

Posted by ma...@redcetus.com.
Hi

> I have several classes derived either from ValidatorForm or ActionForm.
> Both
> classes mark my derived class as serializable. I get a compiler warning
> about a missing serialVersionUID.
>

Maybe you are using non-serializable attributes. Check out the
serializable guide in java's docs.

> Why are those classes serializable, because data transfered through a
> network connection? How do I have to handle this warning? Should I just
> define a dummy serialVersionUID?

They are serializable because they must live in a session scope. Tomcat
will put the http sessions in persistent storage.... therefore,... you get
the picture

Hope it helps.

>
> Sebastian
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Regards

Marcelo


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org