2015年11月16日 | Leave a comment 问题: JSF如何设置区域 解决: 修改/创建 face-config.xml 增加 default-locale 节点如下: <?xml version='1.0' encoding='UTF-8'?> <faces-config version="2.2" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd"> <!-- .... --> <application> <locale-config> <default-locale>zh_CN</default-locale> </locale-config> </application> <!-- .... --> </faces-config> 12345678910111213 <?xml version='1.0' encoding='UTF-8'?><faces-config version="2.2" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd"><!-- .... --> <application> <locale-config> <default-locale>zh_CN</default-locale> </locale-config> </application><!-- .... --></faces-config>