I am trying to Understand your Question and it seems that you want the values in the first JSP to be available in the Second JSP.
It is very bad Habit to Place Java Code snippets Inside JSP file, so that code snippet should go to a servlet.
Pick the values in a servlet ie.
String username = request.getParameter("username");
String password = request.getParameter("password");
Then Store the Values inside the Session:
HttpSession sess = request.getSession();
sess.setAttribute("username", username);
sess.setAttribute("password", password);
These values Will be available anywhere in the Application as long as the session is valid.
HttpSession sess = request.getSession(false); //use false to use the existing session
sess.getAttribute("username");//this will return username anytime in the session
sess.getAttribute("password");//this will return password Any time in the session
I hope this is what you wanted to know, but please do not use code snippets in the JSP. You can always get the values into the JSP using jstl
in the JSPs:
${username}//this will give you the username in the JSP
${password}// this will give you the password in the JSP