【问题标题】:extraClasspath - Not working in Jetty 9.4.20.v20190813extraClasspath - 在 Jetty 9.4.20.v20190813 中不起作用
【发布时间】:2019-10-16 12:23:20
【问题描述】:

在上下文 xml 中设置 extraClasspath 在 Jetty 9.4.20.v20190813 中不起作用。 404 Not Found - 访问 REST 调用时出现问题。没有描述错误的码头日志。

这是我如何为 mywebapp 使用上下文 xml

<?xml version="1.0"  encoding="ISO-8859-1"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
  <Set name="contextPath">/mywebapp/</Set>
  <Set name="war"><Property name="jetty.webapps" default="."/>/mywebapp.war</Set>
  <Call name="setInitParameter">
    <Arg>org.eclipse.jetty.jsp.precompiled</Arg>
    <Arg>true</Arg>
  </Call>
  <Set name="virtualHosts">
    <Array type="java.lang.String">
      <Item>@sslConnector</Item>
      <Item>@httpConnector</Item>
    </Array>
  </Set>
  <Set name="extraClasspath">
    ../myJar.jar
  </Set>
</Configure>

注意:之前,我们使用的是 Jetty 9.4.9.v20180320,上述设置运行良好。

另外,我不确定这个问题是由 extraClasspath 引起的。

任何帮助将不胜感激!

【问题讨论】:

    标签: jetty classloader jetty-9


    【解决方案1】:

    好的,404 Not Found 是因为我们之前有配置在多个连接器(上下文 xml 中的虚拟主机)上公开 mywebapp,但在 Jetty 升级到 9.4.20 后没有重新配置。我已经重新配置,它似乎工作正常。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-02-16
      • 1970-01-01
      • 1970-01-01
      • 2015-10-05
      • 1970-01-01
      • 2016-02-26
      • 2011-07-13
      • 1970-01-01
      相关资源
      最近更新 更多