• Post Reply Bookmark Topic Watch Topic
  • New Topic

plz help me on the querystring hiding..

 
Jack Daniel
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi e'body..
Well, i have a question..!!
A href link is, i guess by default equivalent to method=GET in a form which displays the queryString on the url..( servletname?x=45645 ) If i have some sensitive data in a form, i go for method=POST,.. which doesn't display the data in the querystring..
But what If I have to click on a link to call another servlet..but i'm sending sensitive data..
So how can I hide the data that i am sending to the servlet by clicking on the link, from appearing as a querystring on the url.???
If anybody can help me with this, it would be great.....
Thanks
eagerly waiting for your reply(s)
Here is the code when I come across such a need:

and the data: n=numbers[jk] appears on the url as querystring
 
R K Singh
Ranch Hand
Posts: 5388
1
Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are very much right. Default method if GET.
To send data with method POST, you can have to dirty your hand with JavaScript.
You can have a seperate form tag in your html which contains only hidden variables, these hidden var are the var whose values you want to pass as POST method.
OnClick event of href you sumbit this form as POST.
Another way is given here:
http://www.experts-exchange.com/Web/Web_Languages/JavaScript/Q_20574956.html
HTH
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!