Vm a hyperlink URL as a Get request parameters need to joining together Chinese. If direct, the parameters of the Action to the background object out will be garbled, need code again after joining together to the URL. The solution is to add a member variable in Action, save the encoded parameters in Chinese. Remove the variable values in the vm page renders, stitching links again. Problems here is that invoke the java.net.URLEncoder encode () method, if did not show the specified character set parameters, then the URLEncoder will use the default character set. The default character set in Eclipse to run the main () method and run Web applications in Tomcat, and the result is different, so influence the outcome of the encoding.


code is as follows:

/* * * * * * Translates a string into <Code> X - WWW - form - urlencoded * format. This method USES the platform 'sdefault encoding * as the encoding scheme to obtain thebytes for unsafe characters. * * * @ param s <Code> String To betranslated. * @ deprecated The resulting string mayvary depending id="art580"> # 0 - #

This concludes the body part