java - How can I pass query string from one jsp page to another jsp page without showing the name-value pair at address bar? -


i want send query string 1 jsp page jsp page want hide name-value pairs(attributes) @ address bar when send query string.

first.jsp

<%@ page language="java" contenttype="text/html; charset=iso-8859-1"     pageencoding="iso-8859-1"%> <!doctype html public "-//w3c//dtd html 4.01 transitional//en" "http://www.w3.org/tr/html4/loose.dtd"> <html>     <head>         <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">         <title>first page</title>     </head>     <body>         <a href="second.jsp?username=aditya123&password=abc12345">click here</a>     </body> </html> 

second.jsp

<%@ page language="java" contenttype="text/html; charset=iso-8859-1"     pageencoding="iso-8859-1"%> <!doctype html public "-//w3c//dtd html 4.01 transitional//en" "http://www.w3.org/tr/html4/loose.dtd"> <html>     <head>         <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">         <title>second page</title>     </head>     <body>         <%             string username = request.getparameter("username");             string password = request.getparameter("password");         %>         username : <%=username %><br/>         password : <%=password %><br/>     </body> </html> 

here, pass query string "second.jsp?username=aditya123&password=abc12345" first.jsp page second.jsp page want send without showing username , password attribute , value @ address bar.how can possible?

try code

<form action="some.jsp" method="post"> <input type="text" name="uid" > <input type="password" name="pass"> <input type="submit" name="login" > </form> 

adding method ="post" hides query stringthat ,if remove ' method="post" ' processed url on pressing submit button having following query string

uid="whatever wrote in text field"&pass=""&login="submit"

but after writing ' method="post" ' new url free of query string...!


Comments

Popular posts from this blog

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

java - Could not locate OpenAL library -

sorting - opencl Bitonic sort with 64 bits keys -