I have two JSPs and one Class file that is serializable (I call that my "bean") that I use to store values for
JSP #1 and JSP#2.
JSP #1 sets a value in my "bean" using a setter method. It does not matter that the value is char,
string, or boolean. The user can click on a hyperlink that passes a value back to JSP #1 - and, as a result, I reset the value using the setter method. So far, so good. Now, the user clicks the hyperlink again, so I pass a different value back to JSP #1, and again, I reset the value in the bean. We do this two more times before the user hits the update button and I go to JSP #2 - BUT the value in the bean is the PREVIOUS value - not the one I just set.
In short: this is the sequence:
JSP#1
value = "current"
JSP#1
value = "next"
JSP#1
value = "current"
JSP#1
value= "next"
User presses UPDATE to go to JSP #2. The value JSP#2 picks up is "current". If I hit the "refresh" button before the UPDATE button, the value is CORRECT! This is driving me nuts!
Here is my bean setting in JSP#1 and JSP#2:
<jsp:useBean id="mySession" class="SessionBean" scope="session" />
Thanks for any assistance.