webapp/META-INF /に次のcontext.xmlがあります。 この1は今Mavenの桟橋のプラグインでWebアプリケーションを展開しようとしているイムプロパティTomcatからJettyにcontext.xmlを変換する
<?xml version="1.0" encoding="UTF-8"?>
<Context>
<Parameter name="si.host" value="super.com" override="false"/>
</Context>
で春によって理解される値を定義するためにTomcatで使用されます。
どう<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.26</version>
<configuration>
<connectors>
<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
<port>8080</port>
<maxIdleTime>60000</maxIdleTime>
</connector>
</connectors>
<jettyEnvXml>${basedir}\src\test\resources\server\jetty\jetty-env.xml</jettyEnvXml>
<jettyConfig>${basedir}\src\test\resources\server\jetty\jetty.xml</jettyConfig >
<contextPath>/myapp</contextPath>
<webApp>target/myapp.war</webApp>
<stopKey>foo</stopKey>
<stopPort>9999</stopPort>
</configuration>
<executions>
<execution>
<id>start-jetty</id>
<phase>pre-integration-test</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<scanIntervalSeconds>0</scanIntervalSeconds>
<daemon>true</daemon>
</configuration>
</execution>
<execution>
<id>stop-jetty</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
jetty.xmlファイルにこのパラメータを追加できますか?
私は既にドキュメントを読んでいますが、ここやGoogleでは何も分かりません。
ご協力いただきありがとうございます。
WEB-INF/web.xml
に行く必要
私の場合、 'context-param'は無視されます。私はJetty 9を使用しています。 – expert