Because of the security of the information transmission on the network and the Chinese transmission problem, we need to solve the JS front-end encoding and decoding of the information, the same needs to be in Java acquired JavaScript decoding results of the anti-operation-decoding code.
JS front-end Encoding---"Java decoding , as follows:
PS: When passing a parameter value as a link (such as: http://baidu.com?name=), you need to encode the URL as a parameter, you need to use the encodeURIComponent function encodeURIComponent (URL), this encoding situation in the background of the decoding method and encodeURI corresponding background decoding the same way. In this way, the illusion of not a URL is created, and the network transport is more secure
java encoding---"JS front-end decoding , as follows:
Limitations: This method can better deal with Chinese coding, decoding problems, can prevent Chinese transmission on the network is eavesdropping, but can not encode and decode the English alphabet, follow-up discussion
Reference links 1:http://tech.sina.com.cn/s/2008-07-07/1053722241.shtml about Urldecoder and Urlencoder classes in Java
Reference link 2:http://www.jb51.net/article/41157.htm about JS encoding and decoding method
JS Front end, Java background encoding decoding