Centos7 Jetty7 项目部署 java.io.FileNotFoundException

 出现java.io.FileNotFoundException: /usr/jetty/jetty7.4.5/webapps/test.war

  1. 由于 在start.ini 文件中  

    etc/jetty-deploy.xml

    etc/jetty-webapps.xml

        etc/jetty-contexts.xml

        etc/jetty-testrealm.xml

         etc/jetty-plus.xml

     加载了etc/jetty-contexts.xml 文件

   2. jetty-contexts.xml

<?xml version="1.0"?>

<!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 目录下文件100314_htjC_1028135.png

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

 100723_JiFD_1028135.png

  删掉即可


转载于:https://my.oschina.net/u/1028135/blog/515078

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值