日期:2014-05-16  浏览次数:21056 次

使用Myface时出现No context init parameter 'org.apache.myfaces.ADD_RESOURCE_CLASS' found的解决办法

错误提示:

09:21:10,509 INFO? [MyfacesConfig] No context init parameter 'org.apache.myfaces.ADD_RESOURCE_CLASS' found, using default value org.apache.myfaces.renderkit.html.util.DefaultAddResource
09:21:10,509 INFO? [MyfacesConfig] No context init parameter 'org.apache.myfaces.CHECK_EXTENSIONS_FILTER' found, using default value true

解决办法:
在web.xml中添加
??<context-param>
????????????? <param-name>org.apache.myfaces.ADD_RESOURCE_CLASS</param-name>
????????????? <param-value>org.apache.myfaces.renderkit.html.util.DefaultAddResource</param-value>
?????? </context-param>?
?????? <context-param>
????????????? <param-name>org.apache.myfaces.CHECK_EXTENSIONS_FILTER</param-name>
????????????? <param-value>true</param-value>
?????? </context-param>