I want to ask you , how to pass variable, there’s the example:
I have variable String X in pageone.jsp then i open a new tab page to pagetwo.jsp (using JavaScript window.open) , Is it possible to use the variable X (from pageone.jsp) in pagetwo.jsp ? Please Explain, thank you verymuch!
use
request.setAttribute("attribute_x", x);to store the value of x in request inpage1.jspand then userequest.getAttribute("attribute_x").toString();in thepage2.jspto retrieve the value.You can also use
sessionfor this purpose (session.setAttribute()andsession.getAttribute())