Jose,
 
How you can call two servlets from an HTML page? At one time you can call only one 
servlet and then that servlet can call another. If parallely two servlets executes 
then obvoiusly some time you will get right result and some time wrong but how two 
servlets gets executed simultaneously in a single session.

-----Original Message-----
From: José Enrique Zarco [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 16, 2002 6:09 PM
To: [EMAIL PROTECTED]
Subject: problem with session objects


Hello,
 
I have a problem with servlets and session objects and I don't know how I can solve it.
 
>From a html page I call a servlet for modifying the content of a session object. 
>Immediately after, the html calls other servlet that it returns the data it finds in 
>the session object.
the problem is that Sometimes the servlet returns the values of the lastest session 
object. In this case, its like the second servlet had used the previous
version of the session object.
I have solved the problem stopping the execution during 1 sec. to allow to save the 
session object but I thing it's wrong because I'm penalizing the execution.

Always I use the methods getAttribute() and setAttribute() for using the object.
 
How can I to synchronize this?

 

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to