File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes data mixup for two responses Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "data mixup for two responses" Watch "data mixup for two responses" New topic
Author

data mixup for two responses

Balaji Kadam
Ranch Hand

Joined: Apr 27, 2010
Posts: 31

hi all,

In my one of application a jsp invokes a sevlet do some calculations and saves data to db and at last redirect to same jsp from where request come from. flow is as simple as i explained but problem is that when two different client users click submit button then after servlet jsp page shows mixed data means user 1 gets data of user 2 not all page data but some textboxes.
where should be problem?

problem detail:
-mixing fields data stored in database in xml format at runtime it parses and assigns to particular field.
-i cant use ajax instead of servlet submit because there are lots of parameters which servlet requires.
-i have used synchronization in servlet and jsp. (don't know where it was required or not just tested!)

Thanks
Balaji
joy b chakravarty
Ranch Hand

Joined: May 16, 2011
Posts: 62

hope you are not having instance variables in your servlet and only using local variables


Cheers, Joy [SCJP 1.4, SCBCD 5.0]
get high on alcohol, algorithm or both
Balaji Kadam
Ranch Hand

Joined: Apr 27, 2010
Posts: 31

hello joy,

i have not any instance variable in servlet. and data saves properly in database but jsp retrieves/ shows data from other user.

-Balaji
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: data mixup for two responses
 
Similar Threads
Struts passing data across tiles
Servlet to Applet
Data of previous form gets submitted on refersh
Sending checkbox value to two different servlet page
Submitting a table in a form