The Jsp page gets the data in the properties file

Step 1: Add at the top of the pageimport="java.util.*"

ResourceBundle res = ResourceBundle.getBundle("properties.resource");

write picture description here

Step 2:
write picture description here

third step:
write picture description here

Remarks: Chinese garbled solution

1. Solution 1: When using keyValue, perform encoding conversion
view plaincopy to clipboardprint?
String keyValue = new String(rb.getString(keyName).getBytes("ISO-8859-1"), "GBK");

String keyValue = new String(rb.getString(keyName).getBytes(“ISO-8859-1”), “UTF-8”);

2. Solution 2: Convert machine_zh_CN.properties to unicode form

native2ascii.exe machine_zh_CN.properties machine_zh_CN.txt

p1=/u51b0/u7bb1 p2=/u6d17/u8863/u673a p3=/u7535/u89c6/u673a

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325813520&siteId=291194637