Centos7 Jetty7 項目部署 java.io.FileNotFoundException

 出現java.io.FileNotFoundException: /usr/jetty/jetty7.4.5/webapps/test.warjava

  1. 因爲 在start.ini 文件中  web

    etc/jetty-deploy.xmlapp

    etc/jetty-webapps.xmleclipse

        etc/jetty-contexts.xmlwebapp

        etc/jetty-testrealm.xmlide

         etc/jetty-plus.xmlspa

     加載了etc/jetty-contexts.xml 文件
日誌

   2. jetty-contexts.xmlserver

<?xml version="1.0"?>xml

<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">


<!-- =============================================================== -->

<!-- Add a ContextProvider to the deployment manager                 -->

<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

<!-- This scans the webapps directory for war files and directories  -->

<!-- to deploy.                                                      -->

<!-- This configuration must be used with jetty-deploy.xml, which    -->

<!-- creates the deployment manager instance                         -->

<!-- =============================================================== -->

<Configure id="Server" class="org.eclipse.jetty.server.Server">

        <Ref id="DeploymentManager">

          <Call name="addAppProvider">

            <Arg>

              <New class="org.eclipse.jetty.deploy.providers.ContextProvider">

                <Set name="monitoredDirName"><Property name="jetty.home" default="." />/contexts</Set>

                <Set name="scanInterval">1</Set>

              </New>

            </Arg>

          </Call>

        </Ref>

</Configure>

啓動日誌記錄

2015-10-10 01:09:50.222:INFO::Deployment monitor /usr/jetty/jetty7.4.5/contexts at interval 1

2015-10-10 01:09:50.223:INFO::Deployable added: /usr/jetty/jetty7.4.5/contexts/test.xml

 文件裏 指定加載 contexts 目錄下文件

  test.xml 裏面包含test.war 的信息

 

  刪掉便可

相關文章
相關標籤/搜索