Is your front-end receiving data javascript or jsp? If it is javascript, in the background you can use escape() to encrypt the text, and then use unescape() in javascript to decrypt it. Because JavaScript comes with these two methods for encryption and decryption, which is more convenient. These two encryption and decryption methods have been implemented by experts on the Internet using Java. You can add a tool class and then encrypt in the background in this way, and use JavaScript's own methods to decrypt in the foreground. There must be no garbled characters. If you are using jsp to receive data, it is recommended not to use this method. You can use some built-in objects to pass values.
Is your front-end receiving data javascript or jsp? If it is javascript, in the background you can use escape() to encrypt the text, and then use unescape() in javascript to decrypt it. Because JavaScript comes with these two methods for encryption and decryption, which is more convenient. These two encryption and decryption methods have been implemented by experts on the Internet using Java. You can add a tool class and then encrypt in the background in this way, and use JavaScript's own methods to decrypt in the foreground. There must be no garbled characters. If you are using jsp to receive data, it is recommended not to use this method. You can use some built-in objects to pass values.
Response.sendRedirect("content/template/zpsc.jsp?path="+URLEncoder.encode(realPath, "UTF-8")+"&responseText="+URLEncoder.encode(responseText,"UTF-8") +"");
Be a good person
This is definitely not possible. If you are passing the value through the URL, there will be a transcoding problem
The simpler and more orthodox way is to pass values through built-in objects such as request, session, and application
If you want to transfer Chinese characters through URL, you must first convert the Chinese characters into unicode
Transfer values through built-in objects such as request, session, and application
Front-end js: encodeURI(encodeURI(tag))
Backend java code: String tag = URLDecoder.decode(tag, "utf-8");
How about writing a character filter and giving it a try?