<?xml version="1.0" encoding="Shift_JIS" ?>
<document url="./installation-oas.xml">

  <properties>
<primary>
    <title>The Struts Framework Project - Installation - Orion Application Server</title>
</primary>
    <title>Struts フレームワークプロジェクト - インストール - Orion アプリケーションサーバ</title>
    <translator>樋田 佳之</translator>
  </properties>

  <body>

<primary>
<section name="Installing Struts with your servlet container" href="Containers"> 
</section>
</primary>
<section name="Struts をサーブレットコンテナにインストールする" href="Containers"> 

<primary>
<h4><a name="orion">Orion Application Server</a></h4>
</primary>
<h4><a name="orion">Orion アプリケーションサーバ</a></h4>

<primary>
<p>In the steps below, <code>$ORION_HOME</code> refers to the directory in which 
  you have installed Orion, and <code>$STRUTS_HOME</code> is the directory in 
  which you unpacked the Struts binary distribution.</p>
</primary>
<p>以下のステップにおいて、 <code>$ORION_HOME</code> は Orion
  をインストールしたディレクトリへの参照であり、また <code>$STRUTS_HOME</code>
  は Struts バイナリ配布版を解凍したディレクトリです。</p>

<primary>
<ul>
  <li>Modify the file <code>$ORION_HOME/config/application.xml</code> to define 
    the two new applications, by adding the following declarations, immediately 
    following the <code>web-module</code> directive for the default web application:</li>
</ul>
</primary>
<ul>
  <li><code>$ORION_HOME/config/application.xml</code> ファイルを変更して、 
    既存の Web アプリケーションに関する <code>web-module</code> ディレクティブの直後に次の宣言を追加し、
    ２つのアプリケーションを新しく定義します:</li>
</ul>

<pre>&lt;web-module id="strutsDoc"
path="$STRUTS_HOME/webapps/struts-documentation.war"/>
&lt;web-module id="strutsExample"
path="$STRUTS_HOME/webapps/struts-example.war"/>
</pre>

<primary>
<ul>
  <li>Modify the file <code>$ORION_HOME/config/default-web-site.xml</code> (or 
    the configuration file for any other Orion web site) to include the following 
    declarations, after the declaration for the &lt;default-web-app> if any:</li>
</ul>
</primary>
<ul>
  <li><code>$ORION_HOME/config/default-web-site.xml</code> ファイル（または他の Orion Web サイトの設定ファイル）
    を変更して、（もしあるのならば &lt;default-web-app> 宣言の後に）
    以下の宣言を組み込みます:</li>
</ul>

<pre>&lt;web-app application="default" name="strutsDoc"
  root="/struts-documentation"/>
&lt;web-app application="default" name="strutsExample"
  root="/struts-example"/>
</pre>

<primary>
<ul>
  <li>After you start Orion, you should now be able to access these applications 
    (assuming you haven't changed the port number from the default of 80) at:</li>
</ul>
</primary>
<ul>
  <li>Orion を起動後、（ポート番号を既定の 80 から変更していなければ）
    ここから、これらのアプリケーションに接続することができます:</li>
</ul>

<pre>http://localhost/struts-documentation
http://localhost/struts-example
</pre>

<primary>
<ul>
  <li>Versions of Orion up to at least 1.0.3 have a bug related to ServletContext.getResource() 
    calls that prevent the Struts example application from working out of the 
    box. This manifests itself as a JSP error when you try to access the example 
    application, with the following message:<br/>
    <code>javax.servlet.jsp.JspException: Missing resources attributeorg.apache.struts.action.MESSAGE</code><br/>
    followed by an error traceback. There will also be an initialization error 
    message in the <code>ORION_HOME/log/global-application.log</code> log file. 
    To work around this problem, you can take the following steps:</li>
  <ul>
    <li>Go to the <code>$STRUTS_HOME/webapps</code> directory, where you will 
      note that Orion has automatically expanded each web application into an 
      unpacked directory structure.</li>
    <li>Go to the <code>$STRUTS_HOME/webapps/struts-example/WEB-INF</code> directory, 
      and copy the file <code>struts-config.xml</code> one directory up (that 
      is, into <code>$STRUTS_HOME/webapps/struts-example</code>.</li>
    <li>Modify the <code>$STRUTS_HOME/webapps/struts-example/WEB-INF/web.xm</code> 
      file, changing the value of the "config" initialization parameter (for the 
      action servlet) from <code>/WEB-INF/struts-config.xml</code> to <code>/action.xml</code>.</li>
    <li>Restart Orion, and you should be able to access the example application.</li>
    <li>Note that this workaround has a negative security-related side effect: 
      your <code>struts-conifig.xml</code> file can now be retrieved by remote 
      clients at the following URL:<br/>
      <code>http://localhost/struts-example/struts-config.xml</code><br/>
      Therefore, you should be sure you do not store sensitive information (such 
      as database passwords) in this file. </li>
  </ul>
</ul>
</primary>
<ul>
  <li>Orion の最も古いバージョンである 1.0.3 では ServletContext.getResource() 
    の呼び出しに関するバグがあり、Struts サンプルアプリケーションの動作の妨げになります。
    このこと自体はサンプルアプリケーションに接続してみることで JSP エラー として再現でき、
    次のメッセージを伴います:<br/>
    <code>javax.servlet.jsp.JspException: Missing resources attributeorg.apache.struts.action.MESSAGE</code><br/>
    エラー追跡情報がその後に続きます。そのとき、さらに初期化エラーのメッセージを
    <code>ORION_HOME/log/global-application.log</code> ログファイルに残します。
    次のステップを踏むことで、この問題に対処することができます:</li>
  <ul>
    <li><code>$STRUTS_HOME/webapps</code> ディレクトリへ移動します。
      するとそこに Orion が自動的に展開した各 Web アプリケーションのディレクトリ構造があることに気が付くと思います。
      </li>
    <li><code>$STRUTS_HOME/webapps/struts-example/WEB-INF</code> ディレクトリへ移動し、
      <code>struts-config.xml</code> ファイルを、一つ上のディレクトリへ（つまり
      <code>$STRUTS_HOME/webapps/struts-example</code> の中に）コピーします。</li>
    <li><code>$STRUTS_HOME/webapps/struts-example/WEB-INF/web.xm</code> ［訳注： <code>web.xml</code>
      の誤りと思われます］ファイルを修正して、（ action servlet の） "config" 初期化パラメータを
      <code>/WEB-INF/struts-config.xml</code> から <code>/action.xml</code>へ変更します。</li>
    <li>Orion を再起動すると、サンプルアプリケーションに接続することができます。</li>
    <li>この措置にはセキュリティに関する悪影響があるため注意してください: 
      次の URL から <code>struts-conifig.xml</code> 
      ファイルをリモートクライアントによって取得できるようになります:<br/>
      <code>http://localhost/struts-example/struts-config.xml</code><br/>
      それ故、当然このファイル内には（データベースパスワードのような）
      秘匿情報を保存しておくべきではありません。</li>
  </ul>
</ul>

  <hr/>
<primary>
  <p>Back to <a href="installation.html#Containers">Installation</a></p>
</primary>
  <p><a href="installation.html#Containers">インストールへ戻る</a></p>
</section>
</body>
</document>
