You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Paulo Alvim <al...@powerlogic.com.br> on 2005/04/27 13:08:39 UTC

"Non-serializable attribute" error after migrating from TC5.0.28 to TC.5.5.9

Hi,

We had to use a few "workarounds" in order to get JSTL (fmt) and "Struts el"
tags working together and ok for our I18n features, and one of the tricks
was to use something like that (for every new session - default to
Portuguese language):


(...)
            Locale locale = new Locale("pt","BR");
		    java.util.ResourceBundle bundle=

java.util.ResourceBundle.getBundle("ApplicationResources",locale);

           javax.servlet.jsp.jstl.fmt.LocalizationContext lc =
                new javax.servlet.jsp.jstl.fmt.LocalizationContext(bundle);

           javax.servlet.jsp.jstl.core.Config.set(session,

javax.servlet.jsp.jstl.core.Config.FMT_LOCALIZATION_CONTEXT,lc);

(...)

This was working ok in Tomcat 5.0.28 but Tomcat 5.5.9 throws
"java.lang.IllegalArgumentException: setAttribute: Non-serializable
attribute."

----------------------------------------------------------------------------
--------------------------------

1. We know that it isn't best practices to put non-serializable objects in
the Session...but is this now required?

2. If so: we also have that "FormFile" fields in a few Struts (session
scoped) Forms for upload logic. Since they are also not serializable...what
would be the approach for this case?

 <form-property name="arquivoAnexadoPlc"
type="org.apache.struts.upload.FormFile"/>

Thanks in advance!

Paulo Alvim
Powerlogic
Brazil



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