response.sendRedirect replacing + with space in encrypted URL when receiving in app2?

此生再无相见时 提交于 2019-12-04 18:31:51

In your encrypt method instead of:

return encryptedValue;

use this code:

return URLEncoder.encode(encryptedValue);

then on receiving side call URLDecoder#decode:

String tmpUrl = URLDecoder.decode(encryptedURL);
// call BASE64Decoder on tmpUrl
// call decrypt on return value of BASE64Decoder

You have to use URLEncoding.

When server receives the redirected request, anyway it will do URL decode. So you do not have to do it. Just URLEncode in the app1 should solve your problem.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!