Java Mailing List Archive

http://www.gg3721.com/

Home » Struts Users Mailing List »

Re: [S2] adding serialVersionUID to actions

Laurie Harper

2008-07-02

Replies: Find Java Web Hosting

Author LoginPost Reply
Gabriel Belingueres wrote:
> Hi,
>
> Is there any value in adding the serialVersionUID to all our actions?
> My idea is just to add a @SupressWarning("serial") to each action.
>
> AFAIK, the actions are newly created in each request and are never put
> into session or application scope (by Struts itself at least).
>
> Any ideas of why the ActionSupport class implements java.io.Serializable?

You're right, S2 actions are generally expected to be request scoped.
I'm not sure why ActionSupport implements Serializable; it's probably a
legacy thing. As long as you stick to using request-scoped actions,
there probably isn't any value in generating serialVersionUIDs or them.

L.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 gg3721.com - Jax Systems, LLC, U.S.A.