Session exists on the server.
It's a type of "container" that is used to store variables that need to be remembered between page submits to the server...and need to be remembered between several different pages.
Session doesn't really play a part in the page being submitted to the server. It plays a part in what is returned to the browser though because usually the variables in Session are used for logical decisions that determine your page's output.
So, if you click a submit button twice, the page is submitted to the server twice.
Session, is just a container of variables that you can access in your server code.
After the page is submitted the Java server-side code is executed. Session is available to the Java server-side code and it can be used to determine what should be sent back to the user.
Session kind of works as a key-value list of stuff. The key can only exist once and the value for that key can be over written whenever you need it to be.
So if your page submits to the server, and then your Java code sets a variable in Session, that variable will be available the second time the page is submitted.
That means that whatever happens to your Session variable depends on your server-side logic....Does the Session variable get set every time the page is submitted? Does the Session variable only get set if it hasn't already been set? Is the Session variable used to determine whether or not the user is allowed to view the content?
The important thing to note is that the action of page being submitted is completely separate from Session...the only thing that connects the two is that the page submit submits a request to the server which executes your Java server-code and your server-code may or may not use Session to make decisions on what should be returned to your user.
You really should research the topic of Session.
-Frinny