Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to hide a variable coming in URL  RSS feed

 
ram gaurav
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

i have created 1 jsp page and i have 1 link in that:

<a href="hidingUrl.jsp?id=10">Click here</a>

now what i want to do is that when user click the link then obviously he will go to the respective page, but i want that in URL he will not be able to see the id in url, i appended it with the help of URL rewriting.

Thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66142
141
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rather than use a direct link, submit a form with a method of POST.
 
ram gaurav
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks

But i have only 1 link on that page and i dont want to submit the form , i just want to redirect to another page with that hyperlink
 
Gerardo Tasistro
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could encript the value.
 
Ajith George
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use java script to sumbit the form upon clicking the link. ie call a javascript function upon clicking the link. So you can do post type submission and the client will not feel this.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!