Jetty is a small, pure-Java, open source HTTP server that supports the
2.2 Servlet spec and JSP 1.1. Jetty can be downloaded from
http://www.mortbay.com/jetty.
Jettyは小規模で、JAVAのみで書かれた、
2.2 Servlet とJSP 1.1の仕様に対応したオープンソースHTTPサーバです。
Jettyは
http://www.mortbay.com/jetty
からダウンロードすることができます。
Struts WAR files run nearly straight out of the box when placed
underneath Jetty's webapps directory. The one additional step needed
is to add an entry for each WAR file to the Jetty server configuration
file in order to map the appropriate request paths to the added Struts
web applications (using "<Call name="addWebApplication">...").
StrutsのWARファイルは,Jettyのwabappsディレクトリの下に置けば、すぐに
実行できるようになります。
必要とされる追加のステップは、
各WARファイルのエントリをJettyサーバーの構成ファイルに追加して,
適切なリクエストパスを,追加したStrutsのwebアプリケーションにマップすることです
("<Call name="addWebApplication">..."を使用します)。
So for example, if you have copied the WAR files that come with the
Struts binary distribution into a subdirectory of the
"%JETTY_HOME%/webapps" called "%JETTY_HOME%/webapps/struts" so that
you have:
例えば、
もしあなたがStrutsのバイナリディストリビューションに付属しているWARファイルを
"%JETTY_HOME%/webapps"のサブディレクトリである
"%JETTY_HOME%/webapps/struts"の中にコピーしたら,
以下のようになります。
- %JETTY_HOME%/webapps/struts/struts-documentation.war
- %JETTY_HOME%/webapps/struts/struts-example.war
- %JETTY_HOME%/webapps/struts/struts-exercise-taglib.war
- %JETTY_HOME%/webapps/struts/struts-template.war
- %JETTY_HOME%/webapps/struts/struts-upload.war
- %JETTY_HOME%/webapps/struts/struts-blank.war
And you want to run Jetty using the demo.xml configuration file that
comes with Jetty, just add the following block to demo.xml, anywhere
after the Listeners are declared.
そしてJettyに付属しているdemo.xml構成ファイルを使用してJettyを実行したい場合、
Listenerの宣言の後ろに以下のブロックを加えてください。
<!-- Jetty config for Struts BEGIN -->
<Call name="addWebApplication">
<Arg>/struts/struts-documentation/*</Arg>
<Arg><SystemProperty name="jetty.home"
default="."/>/webapps/struts/struts-documentation.war</Arg>
<Arg><SystemProperty name="jetty.home"
default="."/>/etc/webdefault.xml</Arg>
<Arg type="boolean">false</Arg> <!-- if true,
expand war in temp dir -->
</Call>
<Call name="addWebApplication">
<Arg>/struts/struts-example/*</Arg>
<Arg><SystemProperty name="jetty.home"
default="."/>/webapps/struts/struts-example.war</Arg>
<Arg><SystemProperty name="jetty.home"
default="."/>/etc/webdefault.xml</Arg>
<Arg type="boolean">true</Arg> <!-- if true,
expand war in temp dir -->
</Call>
<Call name="addWebApplication">
<Arg>/struts/struts-exercise-taglib/*</Arg>
<Arg><SystemProperty name="jetty.home"
default="."/>/webapps/struts/struts-exercise-taglib.war</Arg>
<Arg><SystemProperty name="jetty.home"
default="."/>/etc/webdefault.xml</Arg>
<Arg type="boolean">false</Arg> <!-- if true,
expand war in temp dir -->
</Call>
<Call name="addWebApplication">
<Arg>/struts/struts-template/*</Arg>
<Arg><SystemProperty name="jetty.home"
default="."/>/webapps/struts/struts-template.war</Arg>
<Arg><SystemProperty name="jetty.home"
default="."/>/etc/webdefault.xml</Arg>
<Arg type="boolean">true</Arg> <!-- if true,
expand war in temp dir -->
</Call>
<Call name="addWebApplication">
<Arg>/struts/struts-upload/*</Arg>
<Arg><SystemProperty name="jetty.home"
default="."/>/webapps/struts/struts-upload.war</Arg>
<Arg><SystemProperty name="jetty.home"
default="."/>/etc/webdefault.xml</Arg>
<Arg type="boolean">true</Arg> <!-- if true,
expand war in temp dir -->
</Call>
<Call name="addWebApplication">
<Arg>/struts/struts-blank/*</Arg>
<Arg><SystemProperty name="jetty.home"
default="."/>/webapps/struts/struts-blank.war</Arg>
<Arg><SystemProperty name="jetty.home"
default="."/>/etc/webdefault.xml</Arg>
<Arg type="boolean">true</Arg> <!-- if true,
expand war in temp dir -->
</Call>
<!-- Jetty config for Struts END -->
- Author: Paul Runyan
- 著者: Paul Runyan
Back to Installation