【发布时间】: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