how to encrypt/encode url parameters in jsp

前端 未结 4 984
南笙
南笙 2021-01-21 04:53

I want to encrypt a URL variable so that the user can\'t see or modify the information when it is passed in jsp.

This is an example URL:

localhost/somew         


        
4条回答
  •  Happy的楠姐
    2021-01-21 05:37

    Always use POST method.

    And even in POST method, user can see the id and can change it in browser console network tab.So that, user can see other's email attachment since you mentioned in your comment like that.

    So, try to set id in jsp session and get the id in the java servlet code. it is really good practice.

提交回复
热议问题