1

我目前正在开发 JSF 2.0 WebApp,并将我的工作放在我服务器的存储库中。我买了一台新电脑并在上面检查了项目,没有问题。它显示没有错误。所以我使用的是 Eclipse IDE Helios。并在其上安装了一个 tomcat v7 服务器。我启动它,没问题。但是当我查看我的项目时,它没有正确显示。它看起来像这样:

在此处输入图像描述 html呈现如下:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core">

<ui:composition template="/WEB-INF/templates/base.xhtml">

    <ui:define name="head">
        <style type="text/css">
            #content{margin:0 10px !important;}
        </style>        
    </ui:define>

    <ui:define name="sidebar1"></ui:define>

    <ui:define name="content">


            <h:panelGrid columns="2">
            <div class="login">
            <img src="/miloWeb/images/medical.jpg" />
            </div>
            <h:column>
            <center>
                <div class="login">
                    <h4 style="color: #FF0000;"><h:outputText value="#{loginBean.message}"/></h4><br/>
                    <ul style="list-style-type:none; width: 265px; text-align: left;" >
                        <li>User ID</li>
                        <li><h:inputText id="userId" styleClass="loginText" value="#{loginBean.user.userID}"></h:inputText></li>
                        <li>Password</li>
                        <li><h:inputSecret id="password" styleClass="loginText" value="#{loginBean.user.password}"></h:inputSecret></li>
                        <li><h:commandButton id="login" value="Login" action="#{loginBean.login}" styleClass="button"></h:commandButton></li>
                    </ul>
                </div>
            </center>
            </h:column>
            </h:panelGrid>
    </ui:define>

</ui:composition>
</html>

但如果我在我原来的计算机(它工作的那台)上运行它,它应该是这样的:

在此处输入图像描述

html呈现如下:

    <?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><link type="text/css" rel="stylesheet" href="/miloWeb/faces/javax.faces.resource/theme.css?ln=primefaces-aristo" /><script type="text/javascript" src="/miloWeb/faces/javax.faces.resource/jquery/jquery.js?ln=primefaces&amp;v=3.2"></script><script type="text/javascript" src="/miloWeb/faces/javax.faces.resource/primefaces.js?ln=primefaces&amp;v=3.2"></script>
            <title>MILO</title>

        <link rel="stylesheet" type="text/css" href="/miloWeb/css/redmond/jquery-ui-1.8.11.custom.css" media="screen" />
        <link rel="stylesheet" type="text/css" href="/miloWeb/css/style.css" media="screen" />
        <link rel="stylesheet" type="text/css" href="/miloWeb/css/view.css" media="screen" />
        <link rel="stylesheet" type="text/css" href="/miloWeb/css/ezmark.css" media="screen" />


        <!--[if IE]>
            <style type="text/css"> 
                /* place css fixes for all versions of IE in this conditional comment */
                .milo #content { zoom: 1; }
                /* the above proprietary zoom property gives IE the hasLayout it may need to avoid several bugs */
            </style>
        <![endif]-->

        <script type="text/javascript" src="/miloWeb/js/jquery.ezmark.js"></script>
        <script type="text/javascript" src="/miloWeb/js/jquery.maskedinput.js"></script>
        <script type="text/javascript" src="/miloWeb/js/random.js"></script>
        <script type="text/javascript" src="/miloWeb/js/jquery-ui-1.8.11.custom.min.js"></script>


        <script type="text/javascript">
            $(document).ready(function(){
                $(".button").button();
            });

            function loading(){
                $( "#loadingPopUp" ).dialog( "open" );
                return false;
            }

            function unloading(){
                $( "#loadingPopUp" ).dialog( "close" );
                return false;
            }
        </script>
        <style type="text/css">
            #content{margin:0 10px !important;}
        </style></head><body class="milo">
    <form id="j_idt11" name="j_idt11" method="post" action="/miloWeb/faces/pages/index.xhtml;jsessionid=735F094AD14A3977F9976960A61EEB0C" class="miloForm" enctype="multipart/form-data">
    <input type="hidden" name="j_idt11" value="j_idt11" />

            <div id="container">
                <div id="header"><html xmlns="http://www.w3.org/1999/xhtml"><body>

    <div>
        <h1 class="headerTitle">MILO Chart</h1>
        <div class="headerTreadmark">Medical Information Leading Operations Chart</div>
        <div class="clear"></div>
    </div>

    <div id="headerInfo"><table>
    <tbody>
    <tr><td></td></tr></tbody>
    </table>

    </div><div id="j_idt11:j_idt42"></div><script id="j_idt11:j_idt42_s" type="text/javascript">PrimeFaces.cw('AjaxStatus','widget_j_idt11_j_idt42',{id:'j_idt11:j_idt42'});widget_j_idt11_j_idt42.bindCallback('ajaxStart',function(){loading();});widget_j_idt11_j_idt42.bindCallback('ajaxSuccess',function(){unloading();});</script></body>
</html>
                </div>

                <div id="sidebar1">             
                </div>
                <br />
                <br />
                <div id="content"><table>
<tbody>
<tr>
<td>
            <div class="login">
            <img src="/miloWeb/images/medical.jpg" />
            </div></td>
<td>
            <center>
                <div class="login">
                    <h4 style="color: #FF0000;"></h4><br />
                    <ul style="list-style-type:none; width: 265px; text-align: left;">
                        <li>User ID</li>
                        <li><input id="j_idt11:userId" type="text" name="j_idt11:userId" class="loginText" /></li>
                        <li>Password</li>
                        <li><input id="j_idt11:password" type="password" name="j_idt11:password" value="" class="loginText" /></li>
                        <li><input id="j_idt11:login" type="submit" name="j_idt11:login" value="Login" class="button" /></li>
                    </ul>
                </div>
            </center></td>
</tr>
</tbody>
</table>

                </div>

                <br class="clear" />

                <div id="footer"><div id="template_footer_id" style="text-align: center;">&copy; 2012 Bravo Technologies.
</div>
                </div>
            </div><input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="H4sIAAAAAAAAAM1WX2gcRRif3p/ExBjPtIYWSRWMStTumdjEapDmai7k8JoevZha+3DO7U5ye5nbmczM3u0FDPZFH4pQUBEhog8+9KFvfepLRUopFBpQEEERRHxVfFAEfXFm9m73LtmQWpA6D9/O7cz3ze/7fb/95i7/ApKUM/BQFdah4QobG/OQV05Cmuz97svrw29+FQexOdCPCbTmoCkIy4E+UWGIVwi2PHp8Bqgx0LhP2pSaCZCqlmxLjI+/RCHnDcIsl4H95/L6BAydFeNUuYpMMX1x6/VPU3wMxwDwqHRNUDkE6NHuL7hrYAPE5etYMEtSGenAuYhQB7/4u/jz6ve32qH2hd51BkbVfs9YhibiBqojRxgFwkXGshbJko0aWfXqtwtXb3ybunJVhWDgyZ0ur5AaJY6cFZtcoJp2urZy7PelraVB32lkp1PH3idWP7pu/3Boy9/7cEi4XvUTyb/Xt3Cw9tYlnYcsy/5wV4Yx2MzbXHjnvx75+Cb8JA725UCC2+tIpxxrJJTl27CbbdRGUUCB5mXVECvCOmJnb115+f3N2ydjIJYHfSaWxVqANSTAkOY3rfhNFwWznZXpPOjn0sfSMQQY9nfYJF1EzIbYXodljKY9SuuK9xRXdkiAbDSS13IBl6NRrKoskYNYxoJUIBbWsh13XMYyuOu0IjPkyKRWbWFURA2XypDbplE0mU3Fab2EGJUyOLwbmlOuoK4A4fCo52vxwbaU/efRSFHKEf7aYGBy76wLjFDERPNV1OQFZtclq+2zh7Q8BkOJZx231rkoYR2AQtal7ArEFytQZBgqIqHJSXUoQZNFlR1uzQU43M2csli6GplCIZ/LznoSvvHv4HdCU6c8LkB/CC8AFdeg4i0gWiagA+FYay7lO7kLRLtGsTGLlqGLxZz/cjRDKW4uklXk/HHp2bObM9WZAcVQYww8mj6TPXEktzCXlqqiWBLM0xUEpRgMT6lE9oipa+tTE54X9pzn9y6vmozeAdM6J83HM7tQoGw6igH1mGg8BUYiMpDSRl34X/TxD7Z16nLEclaAt9VSk2p5fM/s4rL6R3arvmqUpwnZs/g9spGInBXcKVrDOUegFcSGfvrs8z/Pv3ssplpXsg6xi6TWU+G+BbdWRuydyx+O3P/Bjxfa3Ty+81OcjL4f7k2totW2LMnaprYpv1q9firP/R9SUPa4F4hkIgJTTxem3m5MO08Jm03CkfdJ8KsX22UGWXMbzKQOkNwFJg7c+ymza0jrsmO9GqynqmsuYs20/zCq3NtQS08LMMBal8Bik8rL65FOhcs/MsRlJmpdF92qPUEIRtC5/Rh7+5vNv36Vqn2jrVoKVHBTnntIhyvpcCVMTChs4pTms5nZOyPwvyuqsq689xJ1Yltdt5taaSqzvv27Ojp1b6V4xmsrMaoZ36USO4WiRXVXElR2LVJ6D4TSVLrTvCvTCHi+SL1/ADdCMJVqCwAA" autocomplete="off" />
</form></body>

</html>

顶部的我的图像没有显示,输入文本框丢失,命令按钮也丢失。我检查了文件,但它们似乎都在那里。

看来应用程序的模板方面不起作用,所以这就是为什么“标题”没有出现,我猜想这就是为什么其余属性不能正常工作的原因。

非常感谢任何和所有帮助。我将非常感激!

编辑:添加 web.xml

  <?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
  <display-name>miloWeb</display-name>
  <welcome-file-list>
    <welcome-file>faces/pages/index.xhtml</welcome-file>
  </welcome-file-list>
  <listener>
    <listener-class>com.bravo.listeners.ServletListener</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>/faces/*</url-pattern>
  </servlet-mapping>
  <servlet>
        <servlet-name>PdfServlet</servlet-name>
        <servlet-class>com.bravo.servlets.PdfServlet</servlet-class>
    </servlet>    
    <servlet-mapping>
        <servlet-name>PdfServlet</servlet-name>
        <url-pattern>/PdfServlet</url-pattern>
  </servlet-mapping>
  <filter>
       <filter-name>MyFacesExtensionsFilter</filter-name>
       <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
  </filter> 
  <filter-mapping>
       <filter-name>MyFacesExtensionsFilter</filter-name>
       <servlet-name>Faces Servlet</servlet-name> 
  </filter-mapping>
  <context-param>
    <description>
      This is to Have separated faces.config files            
    </description>
    <param-name>javax.faces.CONFIG_FILES</param-name>
    <param-value>
      /pages/history/faces-config.xml,
      /pages/contactInformation/faces-config.xml,
      /pages/childHealthRecord/faces-config.xml,
      /pages/dashboard/faces-config.xml,
      /pages/insurance/faces-config.xml,
      /pages/search/faces-config.xml,
      /pages/labs/faces-config.xml,
      /pages/patient/faces-config.xml,
      /pages/physical/faces-config.xml,
      /pages/notes/faces-config.xml,
      /pages/scheduler/faces-config.xml,
      /pages/settings/faces-config.xml,
      /pages/orderEntry/faces-config.xml,
      /pages/vitals/faces-config.xml
    </param-value>
  </context-param>
  <context-param>
    <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
    <param-value>*.xhtml</param-value>
  </context-param>
  <context-param>
    <description>State saving method: 'client' or 'server' (=default). See JSF Specification 2.5.2</description>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>client</param-value>
  </context-param>
  <context-param>
    <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
    <param-value>resources.application</param-value>
  </context-param>
</web-app>

本地主机启动控制台中的Tomcatv7.0 服务器的 AS :

一个有效的:

    Apr 17, 2012 12:24:49 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre6\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\Common Files\Roxio Shared\10.0\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files\SlikSvn\bin\;C:\Program Files\Java\jdk1.6\bin
Apr 17, 2012 12:24:50 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Apr 17, 2012 12:24:50 AM org.apache.coyote.ajp.AjpProtocol init
INFO: Initializing Coyote AJP/1.3 on ajp-8009
Apr 17, 2012 12:24:50 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 909 ms
Apr 17, 2012 12:24:50 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Apr 17, 2012 12:24:50 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.4
Apr 17, 2012 12:24:50 AM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor miloWeb.xml from C:\tomcat\conf\Catalina\localhost
Apr 17, 2012 12:25:10 AM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsf/core is already defined
Apr 17, 2012 12:25:10 AM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://shiro.apache.org/tags is already defined
Apr 17, 2012 12:25:11 AM com.sun.faces.config.ConfigureListener contextInitialized
INFO: Initializing Mojarra 2.0.6 (FCS FCS) for context '/miloWeb'
Apr 17, 2012 12:25:13 AM com.sun.faces.spi.InjectionProviderFactory createInstance
INFO: JSF1048: PostConstruct/PreDestroy annotations present.  ManagedBeans methods marked with these annotations will have said annotations processed.
Apr 17, 2012 12:25:13 AM com.sun.faces.config.processor.FaceletTaglibConfigProcessor processComponent
WARNING: JSF1029:  Application is versioned at 2.0 (either explicitly by the version of /WEB-INF/faces-config.xml or the lack of a /WEB-INF/faces-confg.xml), however class 'org.apache.myfaces.custom.aliasbean.AliasBeanTagHandler' depends on a legacy facelet class.  The facelet artifact represented by this class will not be registered.
Apr 17, 2012 12:25:13 AM com.sun.faces.config.processor.FaceletTaglibConfigProcessor processComponent
WARNING: JSF1029:  Application is versioned at 2.0 (either explicitly by the version of /WEB-INF/faces-config.xml or the lack of a /WEB-INF/faces-confg.xml), however class 'org.apache.myfaces.custom.aliasbean.AliasBeansScopeTagHandler' depends on a legacy facelet class.  The facelet artifact represented by this class will not be registered.
Apr 17, 2012 12:25:13 AM com.sun.faces.config.processor.FaceletTaglibConfigProcessor processComponent
WARNING: JSF1029:  Application is versioned at 2.0 (either explicitly by the version of /WEB-INF/faces-config.xml or the lack of a /WEB-INF/faces-confg.xml), however class 'org.apache.myfaces.custom.calendar.HtmlInputCalendarTagHandler' depends on a legacy facelet class.  The facelet artifact represented by this class will not be registered.
Apr 17, 2012 12:25:13 AM com.sun.faces.config.processor.FaceletTaglibConfigProcessor processComponent
WARNING: JSF1029:  Application is versioned at 2.0 (either explicitly by the version of /WEB-INF/faces-config.xml or the lack of a /WEB-INF/faces-confg.xml), however class 'org.apache.myfaces.custom.date.HtmlInputDateTagHandler' depends on a legacy facelet class.  The facelet artifact represented by this class will not be registered.
Apr 17, 2012 12:25:13 AM com.sun.faces.config.processor.FaceletTaglibConfigProcessor processComponent
WARNING: JSF1029:  Application is versioned at 2.0 (either explicitly by the version of /WEB-INF/faces-config.xml or the lack of a /WEB-INF/faces-confg.xml), however class 'org.apache.myfaces.custom.schedule.ScheduleTagHandler' depends on a legacy facelet class.  The facelet artifact represented by this class will not be registered.
Apr 17, 2012 12:25:13 AM com.sun.faces.config.processor.FaceletTaglibConfigProcessor processComponent
WARNING: JSF1029:  Application is versioned at 2.0 (either explicitly by the version of /WEB-INF/faces-config.xml or the lack of a /WEB-INF/faces-confg.xml), however class 'org.apache.myfaces.custom.tabbedpane.HtmlPanelTabbedPaneTagHandler' depends on a legacy facelet class.  The facelet artifact represented by this class will not be registered.
Apr 17, 2012 12:25:13 AM com.sun.faces.config.processor.FaceletTaglibConfigProcessor processComponent
WARNING: JSF1029:  Application is versioned at 2.0 (either explicitly by the version of /WEB-INF/faces-config.xml or the lack of a /WEB-INF/faces-confg.xml), however class 'org.apache.myfaces.custom.tree.taglib.TreeTagHandler' depends on a legacy facelet class.  The facelet artifact represented by this class will not be registered.
Apr 17, 2012 12:25:13 AM com.sun.faces.config.processor.FaceletTaglibConfigProcessor processValidator
WARNING: JSF1029:  Application is versioned at 2.0 (either explicitly by the version of /WEB-INF/faces-config.xml or the lack of a /WEB-INF/faces-confg.xml), however class 'org.apache.myfaces.validator.ValidatorBaseTagHandler' depends on a legacy facelet class.  The facelet artifact represented by this class will not be registered.
Apr 17, 2012 12:25:13 AM com.sun.faces.config.processor.FaceletTaglibConfigProcessor processValidator
WARNING: JSF1029:  Application is versioned at 2.0 (either explicitly by the version of /WEB-INF/faces-config.xml or the lack of a /WEB-INF/faces-confg.xml), however class 'org.apache.myfaces.validator.ValidatorBaseTagHandler' depends on a legacy facelet class.  The facelet artifact represented by this class will not be registered.
Apr 17, 2012 12:25:13 AM com.sun.faces.config.processor.FaceletTaglibConfigProcessor processValidator
WARNING: JSF1029:  Application is versioned at 2.0 (either explicitly by the version of /WEB-INF/faces-config.xml or the lack of a /WEB-INF/faces-confg.xml), however class 'org.apache.myfaces.validator.ValidatorBaseTagHandler' depends on a legacy facelet class.  The facelet artifact represented by this class will not be registered.
Apr 17, 2012 12:25:13 AM com.sun.faces.config.processor.FaceletTaglibConfigProcessor processValidator
WARNING: JSF1029:  Application is versioned at 2.0 (either explicitly by the version of /WEB-INF/faces-config.xml or the lack of a /WEB-INF/faces-confg.xml), however class 'org.apache.myfaces.validator.ValidatorBaseTagHandler' depends on a legacy facelet class.  The facelet artifact represented by this class will not be registered.
Apr 17, 2012 12:25:13 AM com.sun.faces.config.processor.FaceletTaglibConfigProcessor processHandlerClass
WARNING: JSF1029:  Application is versioned at 2.0 (either explicitly by the version of /WEB-INF/faces-config.xml or the lack of a /WEB-INF/faces-confg.xml), however class '[handler-class: null]' depends on a legacy facelet class.  The facelet artifact represented by this class will not be registered.
Apr 17, 2012 12:25:13 AM com.sun.faces.config.processor.FaceletTaglibConfigProcessor processHandlerClass
WARNING: JSF1029:  Application is versioned at 2.0 (either explicitly by the version of /WEB-INF/faces-config.xml or the lack of a /WEB-INF/faces-confg.xml), however class '[handler-class: null]' depends on a legacy facelet class.  The facelet artifact represented by this class will not be registered.
Apr 17, 2012 12:25:13 AM com.sun.faces.config.processor.FaceletTaglibConfigProcessor processHandlerClass
WARNING: JSF1029:  Application is versioned at 2.0 (either explicitly by the version of /WEB-INF/faces-config.xml or the lack of a /WEB-INF/faces-confg.xml), however class '[handler-class: null]' depends on a legacy facelet class.  The facelet artifact represented by this class will not be registered.
Apr 17, 2012 12:25:13 AM com.sun.faces.config.processor.FaceletTaglibConfigProcessor processHandlerClass
WARNING: JSF1029:  Application is versioned at 2.0 (either explicitly by the version of /WEB-INF/faces-config.xml or the lack of a /WEB-INF/faces-confg.xml), however class '[handler-class: null]' depends on a legacy facelet class.  The facelet artifact represented by this class will not be registered.
Apr 17, 2012 12:25:13 AM org.primefaces.webapp.PostConstructApplicationEventListener processEvent
INFO: Running on PrimeFaces 3.2
Apr 17, 2012 12:25:13 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory docs
Apr 17, 2012 12:25:14 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory examples
Apr 17, 2012 12:25:14 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Apr 17, 2012 12:25:14 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Apr 17, 2012 12:25:14 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory host-manager
Apr 17, 2012 12:25:14 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory manager
Apr 17, 2012 12:25:14 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT
Apr 17, 2012 12:25:14 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Apr 17, 2012 12:25:14 AM org.apache.coyote.ajp.AjpProtocol start
INFO: Starting Coyote AJP/1.3 on ajp-8009
Apr 17, 2012 12:25:14 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 24304 ms

一个不起作用:

     Apr 17, 2012 12:25:03 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre6\bin;C:\windows\Sun\Java\bin;C:\windows\system32;C:\windows;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\SlikSvn\bin\;C:\Program Files\Java\jdk1.6.0_29\bin;.
Apr 17, 2012 12:25:03 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:miloWeb' did not find a matching property.
Apr 17, 2012 12:25:03 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Apr 17, 2012 12:25:03 AM org.apache.coyote.ajp.AjpProtocol init
INFO: Initializing Coyote AJP/1.3 on ajp-8009
Apr 17, 2012 12:25:03 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 972 ms
Apr 17, 2012 12:25:03 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Apr 17, 2012 12:25:03 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.4
Apr 17, 2012 12:25:25 AM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsf/core is already defined
Apr 17, 2012 12:25:25 AM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://shiro.apache.org/tags is already defined
Apr 17, 2012 12:25:26 AM com.sun.faces.config.ConfigureListener contextInitialized
INFO: Initializing Mojarra (1.2_12-b01-FCS) for context '/miloWeb'
Apr 17, 2012 12:25:26 AM com.sun.faces.spi.InjectionProviderFactory createInstance
INFO: JSF1048: PostConstruct/PreDestroy annotations present.  ManagedBeans methods marked with these annotations will have said annotations processed.
Apr 17, 2012 12:25:27 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Apr 17, 2012 12:25:27 AM org.apache.coyote.ajp.AjpProtocol start
INFO: Starting Coyote AJP/1.3 on ajp-8009
Apr 17, 2012 12:25:27 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 23737 ms
4

3 回答 3

2

你的 tomcat 中有正确的 Mojarra 版本吗?看起来不是这样:-/

不工作:

Apr 17, 2012 12:25:26 AM com.sun.faces.config.ConfigureListener contextInitialized
INFO: Initializing Mojarra (1.2_12-b01-FCS) for context '/miloWeb'

在职的:

Apr 17, 2012 12:25:11 AM com.sun.faces.config.ConfigureListener contextInitialized
INFO: Initializing Mojarra 2.0.6 (FCS FCS) for context '/miloWeb'
于 2012-04-17T06:02:12.383 回答
0

好吧,从您呈现的 html 中,很明显 JSF 不适用于您的 xhtml。它就是这样。似乎 JSF 配置不正确或 servlet 映射不正确。您可以在此处添加 web.xml,还可以从 tomcat 日志中检查 JSF 是否正确启动(在 helios 控制台视图中)

于 2012-04-17T05:04:48.890 回答
0

好的,我会假设它正在工作,现在没有任何项目更改它不是吗?那么可能的问题包括: 服务器更改?您是否确保 facelets jar 在您的项目或服务器中?改名?也许您的项目有一个新名称,或者您需要确保项目名称在服务器中正确映射?你破坏了你的项目?您在签入或签出项目时是否遇到任何错误?

于 2012-04-17T05:36:20.843 回答