I want to ask you , how to pass variable, there's the example:
Set the varaible into the session in Page1.jsp and access the same in Page2.jsp.
String x = session.getAttribute("X");
Unfortunately that is the wrong way to pass the value. You should never use session to pass values from one jsp to the other.
If you are using window.open, can you post that part of your code so I can suggest a better way.