Ok Jay,

But what about this JSTL recommendation:

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

// This code just sets the lc variable - not serializable in the session
object

javax.servlet.jsp.jstl.core.Config.set(session,javax.servlet.jsp.jstl.core.C
onfig.FMT_LOCALIZATION_CONTEXT,lc);

(...)

In this case we should have to extend that JSTL class...but it used to work
in TC 5.0.28.

Do you know why TC 5.5.9 doesn't accept it?

Thanks,

Paulo

-----Mensagem original-----
De: Jay Hulslander [mailto:[EMAIL PROTECTED]
Enviada em: quarta-feira, 27 de abril de 2005 12:51
Para: Tomcat Users List
Assunto: Re: Nervous about Sessions ...


To store a Java Object in session (HTTPRequest or HTTPResponse), just make
any Object (POJO or something more complicated) implement
serializable.  Keep in mind, you don't need to code an extra functions,
just add the implements serializable to Class definition.
-Jay
At 07:42 AM 4/27/2005 -0400, you wrote:
>If I use the "session" to store things, 1. Can I use simple java types? 2.
>Do I have to use Java Beans (extends serializable)?
>
>David Whitehurst
>
>Viorel Dragomir wrote:
>
>>Yes.
>>But you can set some attributes of the objects as [ transient ] to not be
>>serialized. So you don't have to make all objects in the package
serializable.
>>
>>
>>
>>
>>Viorel Dragomir
>>
>>.
>>..
>>-------------------------------------------------------------------
>>
>>
>>
>>----- Original Message ----- From: David Whitehurst To:
>>tomcat-user@jakarta.apache.org Sent: Wednesday, April 27, 2005 11:31
>>Subject: Nervous about Sessions ...
>>
>>
>>Long ago a multi-client, multi-Oracle application was written using
>>Struts.  Recently, we had a 4 in 22,000 record data integrity issue.  I
>>found one client implementation that used prepared statements but the
>>primary key was being used e.g. "update mytable set a= ?, b=? where
>>pri_key = " + pkey + " ' "; ...whoa! I said, called the developer and we
>>had a talk.
>>
>>Then, I also found that where we use a HashMap object it is not
>>synchronized.  I suspect that was the data problem, i.e. two records
>>saved by two different people, and the data was the same for the
>>different records in the same Oracle second.
>>
>>I'm looking for comments about the use of this HashMap on "requests" but
>>I'm also nervous now where I use Strings in the "session" e.g. a
>>clientname, username, etc. My concern started when I read the posts about
>>the non-serializable objects in the session.  Do all java objects placed
>>in the session have to be serializable?
>>Thanks,
>>
>>David L. Whitehurst
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to