ITeye博客

jsf myfaces1.1.4几个警告

fourfire · 2006-12-28 13:47 · Markdown

1 

警告: /WEB-INF/faces-config.xml has been specified in the javax.faces.CONFIG_FILES context parameter of the deployment descriptor. This should be removed, as it will be loaded twice.  See JSF spec 1.1, 10.3.2

jsf1.1中把/WEB-INF/faces-config.xml作为默认的文件了,因此如果在web.xml存在的话,会警告,并且警告managebean加载两次

去掉web.xml中的

<context-param>

xml 代码

 

  1. <context-param>  

        <param-name>javax.faces.CONFIG_FILES</param-name>  

        <param-value>/WEB-INF/faces-config.xml</param-value>  

      </context-param>

  </context-param>

2

警告: Locale name in faces-config.xml null or empty, setting locale to default locale : zh_CN

faces-config.xml中增加

<application>
  

xml 代码

 

  1. <application>  

            <locale-config>  

                <default-locale>zh_CN</default-locale>  

                <supported-locale>en_US</supported-locale>  

                <supported-locale>de_DE</supported-locale>  

                <supported-locale>fr_FR</supported-locale>  

            </locale-config>  

        </application>

</application>

3

信息: No context init parameter 'org.apache.myfaces.ADD_RESOURCE_CLASS' found, u
sing default value org.apache.myfaces.renderkit.html.util.DefaultAddResource
2006-12-28 13:42:35 org.apache.myfaces.shared_tomahawk.config.MyfacesConfig getB
ooleanInitParameter
信息: No context init parameter 'org.apache.myfaces.CHECK_EXTENSIONS_FILTER' fou
nd, using default value true

web.xml中加入

<param-name><context-param></context-param>

xml 代码

 

  1. <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>  

        <param-value>true</param-value>  

      </context-param>  

      <context-param>  

        <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>  

        <param-value>false</param-value>  

      </context-param>  

      <context-param>  

        <param-name>org.apache.myfaces.PRETTY_HTML</param-name>  

        <param-value>true</param-value>  

      </context-param>  

      <context-param>  

        <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>  

        <param-value>true</param-value>  

      </context-param>

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。