我正在尝试在我的Jetty上配置SSL.
我读到这个:http: //docs.codehaus.org/display/JETTY/How+to+configure+SSL 并创建了一个密钥库.
然后,我直接跳到第4节.但是这个配置文件在哪里我应该配置Jetty?
我试图搜索jetty.xml,但我的计算机上没有这样的...
我正在使用maven-jetty-plugin并尝试使用-Djetty.port = 8090覆盖我的jetty.xml设置,但它不起作用.只有当我从jetty.xml文件中删除连接器部分时,才会将端口设置为8090.
所以:
mvn jetty:run -Djetty.port=8090
Run Code Online (Sandbox Code Playgroud)
连接器从端口8080开始
没有连接器在端口8090中启动
问题是我需要配置接受器,统计和其他东西.我尝试只从连接器中删除端口,但它不起作用.
我正在使用:
JAVA 1.7_05
MAVEN 3.0.4
Jetty 8.1.4
Linux Ubuntu 12.04 64bits
Run Code Online (Sandbox Code Playgroud)
这是我的pom.xml插件配置:
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>8.1.4.v20120524</version>
<configuration>
<stopKey>foo</stopKey>
<stopPort>9990</stopPort>
<jettyXml>src/main/webapp/WEB-INF/jetty.xml</jettyXml>
</configuration>
<executions>
<execution>
<id>start-jetty</id>
<!-- <phase>pre-integration-test</phase> -->
<goals>
<goal>run</goal>
</goals>
<configuration>
<scanIntervalSeconds>0</scanIntervalSeconds>
</configuration>
</execution>
<execution>
<id>stop-jetty</id>
<!-- <phase>post-integration-test</phase> -->
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
Run Code Online (Sandbox Code Playgroud)
Jetty.xml连接器conf:
<Call name="addConnector">
<Arg>
<New class="org.eclipse.jetty.server.nio.SelectChannelConnector">
<Set name="host"><Property name="jetty.host" /></Set>
<Set name="port"><Property name="jetty.port" default="8080"/></Set>
<Set name="maxIdleTime">300000</Set>
<Set name="Acceptors">4</Set>
<Set name="statsOn">false</Set>
<Set name="confidentialPort">8443</Set>
<Set name="lowResourcesConnections">20000</Set>
<Set …
Run Code Online (Sandbox Code Playgroud) 我使用嵌入式jetty Web服务器的java spark web应用程序使用端口号4567.不幸的是,这个端口号在我的计算机上被阻止,并且不希望解除阻塞.如果查看spark文档但它不包含如何将嵌入式Jetty服务器的端口号更改为8080.