I have a small doubt regarding the working of doPost which i have never tried before. I have created a web application with a third party application integrated in it. I am appending the username and password, to the URL which i am redirecting to the third party party application which authenticates the credentials at their end. The thrid party does not need the username and password to be encrypted or encoded and hence I am trying to use a Servlet, where doPost actually encrypts this URL.
public void doPost(HttpServletRequest request,HttpServletRequest response)
{
Userdetails=//Username and password I am getting from Database using Dao
String URL= URL.append(Userdetails)
response.sendRedirect(URL)
}
I like to know whether the above doPost encrypts the above URL mainly, the Username and password appended to it.
Additionally I want to know whether response.sendRedirect(url) encodes the URL or its parameters and sends it to the other server.
No, this doPost will not encrypt the URL for you and even if it were to do that, the browser won't be able to use the encrypted URL.
What should have been done is this:
Of course, you should talk to your app provider and figure out a secure way of transacting with them.
The url does not get encrypted even when you are using secure connection (like https). Instead you can put the user name and password as part of post parameters and use a secure connection.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.