我是一名前端开发人员,拥有使用 jetty 的后端服务器。
我正在做一个属于 web.xml/webdefault.xml/jetty.xml/http://wiki.eclipse.org/Jetty/Howto/Configure_Jetty 中提到的各种其他方法的小修复。 。我知道这些的顺序是有规则的。
我怀疑 Jetty 忽略了更改 - 我怎样才能让 jetty 显示其有效配置?
最佳答案
嗯,这取决于您所做的配置更改。 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 的设置。如果您对此感兴趣,请参阅文档。
实际上,您需要更具体地了解哪些设置不符合您的意愿。
编辑:
您可以在与jetty标准发行版一起提供的webdefault.xml中指定mime设置。以下是该文件的摘录:
<p></p>
<p><!-- ==================================================================== -->
<!-- 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>
--></p>
<p></p>
你试过这样吗?你如何运行 jetty ?嵌入式?标准分布?
关于java - 使jetty显示有效配置?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17490403/