| Author |
Adding Attributes to Servlet Link?
|
Kimberley Jones
Greenhorn
Joined: Sep 09, 2004
Posts: 7
|
|
I am working on a web-based app. I am trying to avoid showing my parameters in the address bar. Is there any way to link to a servlet using <a href="Example"> and have Example pick up some parameters? Is submitting a form the only way a servlet can get parameters without showing your params in the address bar? Thanks in advance for any help/ideas.
|
 |
Adeel Ansari
Ranch Hand
Joined: Aug 15, 2004
Posts: 2874
|
|
yeah we can't say like, <a href="SomeLogger" method="post"> logger </a> hope somebody knows and comes up with a solution.
|
 |
Adeel Ansari
Ranch Hand
Joined: Aug 15, 2004
Posts: 2874
|
|
|
couldn't we use a hidden field. check that field on the server side and then use forward() or sendRedirect(). but ofcourse this is the other way out.
|
 |
Julian Kennedy
Ranch Hand
Joined: Aug 02, 2004
Posts: 823
|
|
Hi Kimberley, If you don't mind using JavaScript you could always submit a form with code like the following: If you want to make your URL parameters inaccessible you need to avoid using HTTP GET. Jules
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12324
|
|
If you absolutely have to use GET - consider encrypting the added attributes - they will be visible but not understandable. Look at some of the SPAM email messages you get - if they contain URLs with long chunks of gibberish - that may be encrypted attributes. Bill
|
 |
Kimberley Jones
Greenhorn
Joined: Sep 09, 2004
Posts: 7
|
|
I will look into both the form and the encrypted attributes ideas...I feel like I've probably seen a lot of encrypted attributes at e-mail and e-commerce sites. Thanks so much for your help.
|
 |
 |
|
|
subject: Adding Attributes to Servlet Link?
|
|
|