使码头显示有效配置?

时间:2013-07-05 13:46:28

标签: java configuration webserver jetty embedded-jetty

我是使用jetty的后端服务器的前端开发人员。

我正在制作一个属于web.xml / webdefault.xml / jetty.xml / http://wiki.eclipse.org/Jetty/Howto/Configure_Jetty中提到的各种其他方法的小修补程序。我知道有关于这些订单的规则。

我怀疑Jetty忽略了这一变化 - 我如何让码头显示其有效配置?

1 个答案:

答案 0 :(得分:1)

嗯,这取决于您所做的配置更改。 Jetty将在stdout输出中输出连接器的端口等内容。

另一件值得一提的是--dry-run:

有关详细信息,请参阅:http://www.eclipse.org/jetty/documentation/current/advanced-jetty-start.html

然后您可以启用jmx,您可以在其中验证许多当前应用的设置:

http://www.eclipse.org/jetty/documentation/current/jmx-chapter.html

web.xml内容通常属于您的应用程序,而不属于jetty。但是,使用jetty可以覆盖web.xml的设置。如果您对此感兴趣,请参阅文档。

实际上,您需要更具体地说明哪些设置未应用于您的意愿。

编辑:

您可以在webdefault.xml中指定mime设置,该设置与jetty的标准分发一起提供。以下是该文件的摘录:

<!-- ==================================================================== --> <!-- Default MIME mappings --> <!-- The default MIME mappings are provided by the mime.properties --> <!-- resource in the org.eclipse.jetty.server.jar file. Additional or modified --> <!-- mappings may be specified here --> <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> <!-- UNCOMMENT TO ACTIVATE <mime-mapping> <extension>mysuffix</extension> <mime-type>mymime/type</mime-type> </mime-mapping> -->

这是你试过的方式吗?你怎么经营码头?嵌入式?标准分布?

相关问题