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 的信息

 

  删掉便可

相关文章
相关标签/搜索