首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Eclipse开发 >

JSF中Tomcat报错解决思路

2011-12-30 
JSF中Tomcat报错我的server(Tomcat)在启动时报错如下:致命的:Localenamenullorempty,ignoring2007/04/2921

JSF中Tomcat报错
我的server(Tomcat)在启动时报错如下:
致命的:   Locale   name   null   or   empty,   ignoring
2007/04/29   21:12:34   org.apache.myfaces.webapp.StartupServletContextListener   initFaces


<?xml   version= "1.0 "   encoding= "UTF-8 "?>
<web-app   xmlns= "http://java.sun.com/xml/ns/j2ee "    
      xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance "   version= "2.4 "  
      xsi:schemaLocation= "http://java.sun.com/xml/ns/j2ee      
      http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd ">
    <context-param>
        <param-name> javax.faces.CONFIG_FILES </param-name>
        <param-value> /WEB-INF/faces-config.xml </param-value>
    </context-param>
    <context-param>
<param-name> javax.faces.STATE_SAVING_METHOD </param-name>
<param-value> client </param-value>
<!--
<description>
State   saving   method:   "client "   or   "server "   (=   default)
See   JSF   Specification   2.5.2
</description>
-->
</context-param>
<context-param>
<param-name> org.apache.myfaces.ALLOW_JAVASCRIPT </param-name>
<param-value> true </param-value>
<!--
                <description>
                        This   parameter   tells   MyFaces   if   javascript   code   should   be   allowed   in   the
                        rendered   HTML   output.
                        If   javascript   is   allowed,   command_link   anchors   will   have   javascript   code
                        that   submits   the   corresponding   form.
                        If   javascript   is   not   allowed,   the   state   saving   info   and   nested   parameters
                        will   be   added   as   url   parameters.
                        Default:   "true "
                </description>
                -->
</context-param>
<context-param>
<param-name> org.apache.myfaces.PRETTY_HTML </param-name>
<param-value> true </param-value>
<!--
                <description>
                        If   true,   rendered   HTML   code   will   be   formatted,   so   that   it   is   "human   readable ".
                        i.e.   additional   line   separators   and   whitespace   will   be   written,   that   do   not


                        influence   the   HTML   code.
                        Default:   "true "
                </description>
                -->
</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.AUTO_SCROLL </param-name>
<param-value> true </param-value>
<!--
                <description>
                        If   true,   a   javascript   function   will   be   rendered   that   is   able   to   restore   the
                        former   vertical   scroll   on   every   request.   Convenient   feature   if   you   have   pages
                        with   long   lists   and   you   do   not   want   the   browser   page   to   always   jump   to   the   top
                        if   you   trigger   a   link   or   button   action   that   stays   on   the   same   page.
                        Default:   "false "
                </description>
                -->
</context-param>
    <context-param>
<param-name> javax.servlet.jsp.jstl.fmt.localizationContext </param-name>
<param-value> ApplicationResources </param-value>
    </context-param>
    <listener>
        <listener-class> org.apache.myfaces.webapp.StartupServletContextListener </listener-class>
    </listener>
    <servlet>
        <servlet-name> Faces   Servlet </servlet-name>
        <servlet-class> javax.faces.webapp.FacesServlet </servlet-class>
        <load-on-startup> 1 </load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name> Faces   Servlet </servlet-name>
        <url-pattern> *.jsf </url-pattern>
    </servlet-mapping>
    <filter>
        <filter-name> MyFacesExtensionsFilter </filter-name>
        <filter-class> org.apache.myfaces.component.html.util.ExtensionsFilter </filter-class>
        <init-param>
            <param-name> maxFileSize </param-name>
            <param-value> 20m </param-value>


        </init-param>
    </filter>
    <filter-mapping>
        <filter-name> MyFacesExtensionsFilter </filter-name>
        <url-pattern> *.faces </url-pattern>
    </filter-mapping>
    <welcome-file-list>
    <welcome-file> index.jsp </welcome-file>
    </welcome-file-list>
</web-app>


这里是配置文件出了问题还是服务器的问题?麻烦好心人帮忙看看!感激不尽。

[解决办法]
关注
[解决办法]
显然是配置问题了
看看web.xml里面的路径什么的有没有错

热点排行