> jsp:useBean and set scope as "session"
> then error raised.
> something about "standardSession.setAttribute.iae"
> like can not find message for key
> I use jboss-3.0with tomcat 4.0.3 compiled from
> and JVM 1.3.1p6 for FreeBSD 4.5 build
The object you want to put into the session is not serializable. This is a good hint for me to change the message-bundles for clustering...
I just found it and change my javabean:-)
then I come here to post it and found your reply.
yes it really need implement Serializable.
and then works well.
But I should get a message like "Non-serializable" etc.
instead of getting "can not found the message for key"..iae" "
I read the tomcat's source and got it.
in the file "LocalStrings.properties"(after compiled the file in catalina.jar),I can not found the "standardSession.setAttribute.iae" definition instead I found the definition for "standardSession.setAttribute.ise" twice:-)
I think it is the problem,Because one of them is "Non-serializable Attribute" and the other is "Session already invalidated"
I changed the first to "iae" and from here got an idea to solve the problem"
Maybe It should be tomcat's BUG.
But I think If you can post a message to info me what happend, instead of giveing an exception ,maybe It will be more great:-)
thank you again for your great wrok:-)
I have found it and come here to post it,but found your great reply:-)
yes the javabean must implement serializable.
but I think if it can give me an message instead of exceptions,It will more great:-)
about the "can not found message for key"...iae",
I think It is a bug in tomcat.
because the file "LocalStrings.properties" did not give the
"standardSession.setAttribute.iae" definition,but define "standardSession.setAttribute.ise" twice.
you can found the file in catalina.jar and from source it in <PATH TO SRC>/catalina/src/share/org/apache/catalina/session/LocalStrings.properties"
Fixed in HEAD and Branch_3_0 (so it will be in 3.0.1)...
To understand why your bean must be serializable:
- The session clustering code sends the session to the other nodes in the cluster when it is modified. So all contents of the session must be serialized before we can send it. So every object in the session MUST implement Serializable.