Hi,
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:
-------------
<%@ page session="true" />
<jsp:useBean id="data" scope="page" class="com.company.package..." />
<% ....
JAVA code process the html form .... %>
<%@ include file="htmlForm.jsp" />
And in htmlForm.jsp:
<% 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 ]