---
title: "jsf myfaces1.1.4几个警告"
author: "fourfire"
date: "2006-12-28T13:47:00Z"
tags: []
slug: "jsf-myfaces1-1-4"
draft: false
lastmod: "2006-12-28T13:47:00Z"
id: 41174
url: "https://fourfire.iteye.com/blog/41174"
---

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中的

&lt;context-param&gt;

xml 代码

 

1. &lt;context-param&gt;  
   
       &lt;param-name&gt;javax.faces.CONFIG\_FILES&lt;/param-name&gt;  
   
       &lt;param-value&gt;/WEB-INF/faces-config.xml&lt;/param-value&gt;  
   
     &lt;/context-param&gt;

  &lt;/context-param&gt;

2

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

faces-config.xml中增加

&lt;application&gt;  
  

xml 代码

 

1. &lt;application&gt;  
   
           &lt;locale-config&gt;  
   
               &lt;default-locale&gt;zh\_CN&lt;/default-locale&gt;  
   
               &lt;supported-locale&gt;en\_US&lt;/supported-locale&gt;  
   
               &lt;supported-locale&gt;de\_DE&lt;/supported-locale&gt;  
   
               &lt;supported-locale&gt;fr\_FR&lt;/supported-locale&gt;  
   
           &lt;/locale-config&gt;  
   
       &lt;/application&gt;

&lt;/application&gt;

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中加入

&lt;param-name&gt;&lt;context-param&gt;&lt;/context-param&gt;

xml 代码

 

1. &lt;param-name&gt;org.apache.myfaces.ALLOW\_JAVASCRIPT&lt;/param-name&gt;  
   
       &lt;param-value&gt;true&lt;/param-value&gt;  
   
     &lt;/context-param&gt;  
   
     &lt;context-param&gt;  
   
       &lt;param-name&gt;org.apache.myfaces.DETECT\_JAVASCRIPT&lt;/param-name&gt;  
   
       &lt;param-value&gt;false&lt;/param-value&gt;  
   
     &lt;/context-param&gt;  
   
     &lt;context-param&gt;  
   
       &lt;param-name&gt;org.apache.myfaces.PRETTY\_HTML&lt;/param-name&gt;  
   
       &lt;param-value&gt;true&lt;/param-value&gt;  
   
     &lt;/context-param&gt;  
   
     &lt;context-param&gt;  
   
       &lt;param-name&gt;org.apache.myfaces.AUTO\_SCROLL&lt;/param-name&gt;  
   
       &lt;param-value&gt;true&lt;/param-value&gt;  
   
     &lt;/context-param&gt;