<?xml version="1.0" encoding="Shift_JIS"?>
<document url="./installation-wls.xml">

  <properties>
    <author>Robert Hayden</author>
    <author>Wong Kok Kai</author>
    <title>The Struts Framework Project - Installation - Weblogic</title>
    <translator>日置 聡</translator>
  </properties>

  <body>

<primary>
<section name="Installing Struts with your servlet container" href="Containers"/> 
</primary>

<section name="Strutsをサーブレットコンテナにインストールする" href="Containers">

<h3><a name="wls5">Weblogic 5.1 (service pack 8)</a></h3>

<ul>
<primary>
  <li>Obtain and install the Xerces XML parser (problems have been reported with 
    the Sun reference implementation). Put xerces.jar in your WebLogic system 
    path.</li>
</primary>
  <li>Xerces XML パーサーを取得してインストールしてください (Sunのリファレンス実装では問題が発生することがレポートされています)。
      WebLogicのシステムパスに xerces.jar を配置してください。</li>

<primary>
  <li>Obtain and unpack the Struts binary distribution (this procedure assumes 
    it was extracted to <code>c:\jakarta-struts</code>).</li>
</primary>
  <li>Strutsのバイナリディストリビューションを取得して展開してください
    (この文章は以後、Strutsが <code>c:\jakarta-struts</code>に配置されていると仮定しています)。</li>

<primary>
  <li>Add an entry to weblogic.properties for each of the Struts web applications 
    that you would like to configure. For example, to make the struts-example 
    application available, add the following line to weblogic.properties:<br/>
    <code>weblogic.httpd.webApp.strutsexample=<br/>
    c:/jakarta-struts/webapps/struts-example.war</code></li>
</primary>
  <li>weblogic.properties に構成したいStruts Webアプリケーションのエントリーを追加してください。
    例えばstruts-exampleアプリケーションを動作させるためには、以下の記述を weblogic.properties に追加します:<br/>
    <code>weblogic.httpd.webApp.strutsexample=<br/>
    c:/jakarta-struts/webapps/struts-example.war</code></li>

<primary>
  <li>You do not need to include struts.jar or any of the application specific 
    classes in the WebLogic classpath, since this will be done automatically (unless 
    deploying an unpacked web archive- see below).</li>
</primary>
  <li>struts.jarや他のアプリケーションが必要とするクラスへの参照は自動的に設定されるため、
    WebLogicクラスパスに追加する必要はありません
    (展開してしまったWebアーカイブを配備しない限り - 以下を参照して下さい)。</li>

<primary>
  <li>Start WebLogic server and point your web browser to the struts application. 
    For example, to connect to the example application added in step 3:<br/>
    <code>http://localhost:7001/strutsexample</code></li>
</primary>
  <li>WebLogicサーバーを起動してWebブラウザからStrutsアプリケーションを参照してください
    例えばステップ3で登録したサンプルアプリケーションを参照するためには以下のアドレスにアクセスします:<br/>
    <code>http://localhost:7001/strutsexample</code></li>

<primary>
  <li>This example application depends on the Struts specific resource file ApplicationResources.properties 
    to be present on the classpath. However, WebLogic only extracts *.class files 
    from the archive so this file will not be found, resulting in an error the 
    first time it is needed- something similar to: javax.servlet.ServletException: 
    runtime failure in custom tag 'message'. Steps 6 &amp; 7 will need to be performed 
    for this application, and any other that relies on ApplicationResources.properties.</li>
</primary>
  <li>このサンプルアプリケーションはクラスパスに置かれるStrutsの詳細情報を記述したリソースファイル
    ApplicationResources.properties に依存します。
    しかしWebLogicは *.class ファイルのみをアーカイブから取り出すのでこのファイルは検出されず、
    最初にアクセスしたときには何かが足りないという以下のようなエラーとなります:<br/>
    javax.servlet.ServletException: runtime failure in custom tag 'message'<br/>
    ステップ6とステップ7はこのアプリケーションや他の ApplicationResources.properties 
    を利用している全てのアプリケーションで必要となります。</li>

<primary>
  <li>Extract ApplicationResources.properties from the *.war file, and manually 
    copy it to the respective package in the _tmp_war_ directory WebLogic created 
    for this application. Again referring to the struts-example application, this 
    would be:<br/>
    <code>c:\jakarta-struts\webapps\WEB-INF\_tmp_war_strutsexample</code></li>
</primary>
  <li>ApplicationResources.properties を *.war ファイルから取り出し、WebLogicがアプリケーション内に作成する
    それぞれのパッケージの中の _tmp_war_ ディレクトリに手動でコピーします。
    struts-exampleを例にあげると以下のディレクトリとなります:<br/>
    <code>c:\jakarta-struts\webapps\WEB-INF\_tmp_war_strutsexample</code></li>

<primary>
  <li>Restart WebLogic. You will now be able to run the application:<br/>
    <code>http://localhost:7001/strutsexample</code></li>
</primary>
  <li>WebLogicを再起動してください。以下のアドレスからアプリケーションを動作させることが出来るはずです:<br/>
    <code>http://localhost:7001/strutsexample</code></li>

</ul>
<primary>
<p>The above steps should be followed for applications deployed as *.war files. 
  For unpacked web applications, configuration involves adding both <code>struts.jar</code> 
  and <code>/WEB-INF/classes</code> to the WebLogic classpath. For this reason, 
  I would suggest deploying applications as war files to WebLogic. However, the 
  same example application can be successfully deployed in extracted format by 
  modifying weblogic.properties (assuming the war was extracted to directory webapps/struts-example):</p>
</primary>
<p>ここまでで説明した内容は *.war ファイルとして配備されたアプリケーションの導入方法です。 
  展開されたままのWebアプリケーションを登録する為には <code>struts.jar</code> と
  <code>/WEB-INF/classes</code> への参照を WebLogic クラスパスに追加しなくてはなりません。
  ですので、warファイルとしてWeblogicに配備する方法を推奨します。
  しかし、weblogic.propertiesを以下のように編集することによって、同じサンプルアプリケーションを
  展開された形で配備することが可能です(warの内容がが webapps/struts-example に展開されたと仮定します):</p>

<p><code>weblogic.httpd.webApp.strutsexample=<br/>
  c:/jakarta-struts/webapps/struts-example/</code></p>

<primary>
<p>And starting WebLogic with the updated WebLogic classpath. For example:</p>
</primary>
<p>その後に、更新した WebLogic クラスパスにて WebLogic を起動します。以下はその例です:</p>

<p><code>c:\jdk1.3\bin\java -ms16m -mx64m<br/>
  -classpath c:\weblogic\lib\weblogic510sp8boot.jar;</code></p>
  <hr/>

<primary>
  <h4>Additional Recommendations</h4>
</primary>
  <h4>推奨する追加設定</h4>
  <ul>
<primary>
  <li>Servlet and JSP-Reloading should be turned off. First, you pay a performance 
    penalty. Depending on the number of JSPs, the number of requests and the 
	configured checking interval, the server will slow down. Second, with JSP- and 
	Servlet reloading, one opens the door for various Weblogic classloader problems, 
	that are difficult to diagnose, difficult to handle and often lead to lost 
	HTTP-sessions.</li>
</primary>
  <li>ServletとJSPのリロード機能はOFFにしておくべきです。
    第1にパフォーマンスの低下を招きます。JSPの数、リクエストの量、 設定の量に比例してサーバーの速度は低下します。
    第2にJSPとServletのリロードはさまざまなWeblogicのクラスローダーの問題を引き起こします。
    これは調査、再現が難しく、HTTPセッションの切断も招きます。</li>

<primary>
  <li>Set the name of the <code>sessionid</code> to <code>JSESSIONID</code>, if cookies are used for session 
    tracking and to jsessionid, if sessions are URL-based. (There are additional 
	problems related to URL-based sessions, caused from BEA's way to encode the session 
	id (J2EE-incompatible) as query-param. Especially &lt;bean:include&gt; will not work with 
	URL-based sessions yet. However, using the correct session name solves at least some 
	problems.)</li>
</primary>
  <li>セッショントラッキングにクッキーが使用される場合には　<code>JSESSIONID</code>を、
   URLベースの場合には jsessionid を、<code>sessionid</code> の名前として設定してください。
    (更に、セッションIDをクエリパラメータとしてエンコードしてしまうBEA独自実装(J2EE-非準拠)
    によって引き起こされる、URLベースのセッションに関わる問題も存在します。 
    特に &lt;bean:include&gt; はURLベースのセッションでは現状動作しません。
    しかし、正しいセッション名を使用することによって少なくともいくつかの問題は解決できます。)</li>

<primary>
  <li>Configure the JSP-Servlet registration in <code>weblogic.properties</code> for 
    maximum J2EE-compliance and/or for maximum performance.</li>
</primary>
  <li><code>weblogic.properties</code>内のJSP-Servletの登録方法を最大限に J2EE に準拠しつつ（/または）
    最大限のパフォーマンスが出るように設定します。</li>

</ul>

<primary>
  <p>The JSP-Servlet supports some initialization parameters that can be customized to get 
    best performance, maximum compliance or (as shown below) easier debugging:</p>
</primary>
  <p>JSP-Servletはいくつかの初期化パラメータをサポートしていて、
  より良いパフォーマンスを得たり、最大限に仕様に準拠させたり、(下記のように)デバッグをし易くするようにカスタマイズすることができます:</p>

<pre>
  weblogic.httpd.initArgs.*.jsp=\
       pageCheckSeconds=-1,\
        setEmptyStrings=false,\
         compileCommand=./_jspCompiler_.cmd,\
             workingDir=/weblogic/myserver/tmp_classfiles,\
          keepgenerated=true,\
                  debug=true,\
                verbose=true
</pre>
<primary>
<p>In the above example, the batch file (<code>_jspCompiler_.cmd</code>) invokes jikes 
   which results dramatically reduced startup times (jikes is about three times faster 
   than javac.) The batchfile contains only a single line:</p>
</primary>
<p>上記の例ではバッチファイル (<code>_jspCompiler_.cmd</code>) によって、劇的に起動時間の早い jikes に処理を依頼しています。
   (jikesはIBMの公開しているJavaコンパイラで約３倍javacよりも速いといわれています) 
   このバッチファイルには以下の1行のみを記述します:</p>

<pre>@jikes -g -nowarn %*</pre>

<p>The next configuration could be used when all tests have been done and speed is the 
major concern ...</p>
<primary>
<p>以下の設定は、全てのテストが完了してスピードが第一用件となった時には有用かもしれません...</p>
</primary>

<pre>  
  weblogic.httpd.initArgs.*.jsp=\
       pageCheckSeconds=-1,\
        setEmptyStrings=false,\
         compileCommand=./_jspCompiler_.cmd,\
             workingDir=/weblogic/myserver/tmp_classfiles,\
          keepgenerated=false,\
                  debug=false,\
                verbose=false
</pre>

<primary>
<p>... together with ...</p>
</primary>

<p>... 下記バッチファイルとともに ...</p>

<pre>@jikes -O -nowarn %*</pre>

<primary>
<p>Weblogic supports similar settings through <code>&lt;context-params&gt;</code> in <code>web.xml</code>
(Please read the latest documentation at the BEA website for details.)</p>
</primary>
<p>Weblogicはこれに似た設定を <code>web.xml</code> の中の <code>&lt;context-params&gt;</code> でサポートしています。
(詳細な内容についてはBEAWebサイトの最新のドキュメントを参照して下さい)</p>

<primary>
<p>For additional issues, see also <a href="http://www.mail-archive.com/struts-dev@jakarta.apache.org/msg00284.html">More 
fixes for WLS 5.1 SP8</a> from the Struts Developer mailing list</p>
</primary>
<p>Struts開発者メーリングリスト内の<a href="http://www.mail-archive.com/struts-dev@jakarta.apache.org/msg00284.html">More 
fixes for WLS 5.1 SP8</a> に、追加情報がありますので参照してください。 </p>

<hr/>  

  <ul>
    <li>著者: Robert Hayden</li>
    <li>著者: Wong Kok Kai</li>
    <li>著者: Matthias Kerkhoff </li>
  </ul>
  <hr/>  
  <p><a href="installation.html#Containers">インストール</a>へ戻る</p>
</section>
</body>
</document>
