I am working on a web application in JSP model 1, which includes another jsp file as html form with values from bean defined in the parent JSP file, and posts request back to parent JSP to process the request. This JSP page has session data mixed up problem and I could not find what's wrong in the code. (In fact, we couldn't reproduce this problem in our QA. The problem only occured when there are a lot of concurrent users.) The JSP does not have instance variables, and the majority code were got compiled in the service() method. It looks like this: -------------
<% some JAVA code that uses variables and beans defined in parent JSP %> <!-- html form --> <input type="text" name="field" value="<%= data.getName() %>" />
-------------- Can anyone help me to figure what's wrong on this code? We were using inclue tag to embed the html form in the parent JSP, is this the cause of the session data error? Should we use jsp:include instead? Or is there any other possible reason that the JSP is not thread safe? (Again, the JSP doesn't have any instance variables)!
Thanks very much for any help! I've run out of ideas on how to debug this problem!
[ October 19, 2004: Message edited by: JW Li ]
[ October 19, 2004: Message edited by: JW Li ] [ October 20, 2004: Message edited by: Bear Bibeault ]
I'm going to have to agree. At the moment the only thing we know for sure is that you have a problem. I still tend to think it's a thread safety problem, but there have been times when HTTP proxies have swapped user's session IDs, but this was a pretty extreme case.
Joined: Mar 11, 2003
Thanks for your input! It's very hard to get the related part of code posted, partly because the long trivial processing code, and partly because I don't know what's wrong. Anyway, here's the code, and thanks very much for your patience to help me debug... I am thinking maybe we should use jsp:include instead of include to embed the html form jsp since it contains dynamic data in it, which may cause thread safety problem...
The problem is that customer A gets customer B's notes:
----------------------- Thanks again! Any input is highly appreciated! [ October 20, 2004: Message edited by: JW Li ]
[ October 20, 2004: Message edited by: JW Li ] [ October 20, 2004: Message edited by: JW Li ]