Search code examples
javagetstruts-1url-parametersstruts1

Hide sending parameters from url


I should use link. And it means that method GET and all parameters I can see in url. How I can hide parametrs from url like that

http://localhost:8080/MyApp/action.do?method=delete&id=0

And how after that I can get parametrs in java class.


Solution

  • You can't hide GET parameters from a URL. GET name value pairs have to be part of a request. However one thing you can certainly try is to encrypt your querystring into a string which only your code can decode on your host, for example

    http://localhost:8080/MyApp/action.do?method=delete&id=0 
    

    could be

    http://localhost:8080/MyApp/action.do?param=[ENCRYPTED/OBFUSCATED STRING] 
    

    then your application at the above url can decode that and convert back into name value pairs