I am currently developing a web application in J2EE with one servlet and jps, that contains a shopping cart, I would like to know how to prevent the user from modifying the id of the item that is in the url, because when he does it automatically adds an item to the cart.
here is the example : http://localhost:8080/Online_library/BookServlet/addToBasket?action=addToBasket&idBook=63&idUser=4 if i change the id to 64 for example it will add me the item with id 64. I would like to do the same thing for other actions, like changing the settings of an account for example