Tested with: Microsoft IIS 5.0, Windows 2000
テスト環境: Microsoft IIS 5.0, Windows 2000
Important Note:
重要なお知らせ:
At the moment, JRun is not fully compliant with the JSP 1.1/1.2
specification.
現在のところ、JRun は JSP 1.1/1.2 の仕様に準拠していません。
Specifically, the automatic type conversions for custom tag parameters
specified in "Issue 7" of the JSP 1.1 Errata and in the JSP 1.2 Proposed
Final Draft have not yet been implemented.
具体的には、 JSP 1.1 修正の "課題点 7" 及び JSP 1.2 最終ドラフト案にある、
独自タグのパラメータの自動での型変換に関する仕様を実装していません。
As it stands, JSP pages that make use of Struts taglibs whose parameters
require conversion (such as booleans) will not compile under JRun. This
includes the Struts Example Application. Attempting to run the example
application will result in an exception similar to the following being
thrown:
そのため、JSP ページを Struts taglibs を使用して作成し、
それらがパラメータの(ブール値などの)変換を必要とする場合は JRun
によるコンパイルを行うことができません。
これは Struts サンプルアプリケーションにも含まれており、
試しにサンプルアプリケーションを実行してみると、
結果として次に示すような例外をスローします:
/struts-example/index.jsp:
javax.servlet.ServletException: Compilation error occured:
allaire.jrun.scripting.DefaultCFE:
Errors reported by compiler:
c:/JRun/servers/default/Struts
Example/WEB-INF/jsp/jrun__index2ejspa.java:41:1:41:27:
Error: No match was found for method "setLocale(java.lang.String)".
(For more details see refer to:
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg01860.html)
(詳細についてはこちらを参照してください:
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg01860.html)
The following instructions describe how to install the Struts Example
Application under JRun. A subsequent section describes how the Struts Example
Application can be patched to work with Struts
次に JRun 配下に Struts サンプルアプリケーションをインストールする方法について記述します。
後に続く章で Struts を動作させるために Struts
サンプルアプリケーションにパッチを当てる方法について記述します。
The following instructions assume the following:
後続の記述は、以下に記述されていることを前提とします
- JRun has been installed and integrated with the web server of choice.
- $APP_SERVER_NAME is the name of the application server used to host the
application. (When JRun is first installed, it creates an application
server called JRun Default Server).
- $APP_SERVER_DIR is the directory used to hold applications hosted by
$APP_SERVER_NAME. For the JRun Default Server, the directory is
$JRUN_HOME/servers/default where $JRUN_HOME is the directory where
JRun is installed.
- 適当な Web サーバに JRun をインストールし、稼動可能にします。
- $APP_SERVER_NAME はアプリケーションが稼動するアプリケーションサーバの名前です(
JRun のインストール直後は、JRun デフォルトサーバをアプリケーションサーバとします)。
- $APP_SERVER_DIR は $APP_SERVER_NAME によって稼動されるアプリケーションを保管するためのディレクトリです。
JRun デフォルトサーバの場合、 JRun をインストールしたディレクトリ $JRUN_HOME 配下の
$JRUN_HOME/servers/default がそのディレクトリになります。
Installing the struts example application
Struts サンプルアプリケーションのインストール
- Login to the JRun Management Console.
- On the left pane, select $APP_SERVER_NAME. A page showing the
current server status will be shown on the right pane.
- On the right pane, click on the WAR Deployment link. A page
containing a list of the currently deployed web applications will be
shown.
- On the right pane, click on Deploy an Application. Complete the Web
Application Information form as follows:
- Servlet War File or Directory: Enter the full path where
struts-example.war is found or click on Browse to select
the path.
- JRun Server Name: $APP_SERVER_NAME
- Application Name: Struts Example
- Application Hosts: All Hosts
- Application URL: /struts-example
- Application Deploy Directory: will default to
$APP_SERVER_NAME/Struts Example (or the name as specified for
Application Name).
- Once the form is complete, click on the Deploy button.
- If deployment is successful, restart the application server by
clicking on
$APP_SERVER_NAME on the left pane. A page showing the
current server status will be shown on the right pane. Click the
Restart Server button to restart the application server.
- Test the sample application by using the following URL in the
browser:
http://hostname/struts-example/index.jsp
The struts-documentation.war can be installed using the same
procedure.
- JRun 管理コンソールにログインします。
- 左枠内から、$APP_SERVER_NAME を選択します。
右枠内のページに選択したサーバの状態が表示されます。
- 右枠内、 WAR 公開リンクをクリックします。
ページ内に現在、公開されている Web アプリケーションのリストが表示されます。
- 右枠内の、アプリケーションの公開をクリックします。
次のようにして Web アプリケーションの情報フォームの入力を完了します:
- サーブレット War またはディレクトリ: struts-example.war
がある場所の完全パスを打ち込むまたは、参照をクリックして選択したパスを入力します。
- JRun サーバー名: $APP_SERVER_NAME
- アプリケーション名: Struts Example
- アプリケーション ホスト: すべてのホスト
- アプリケーションの URL: /struts-example
- アプリケーションの 公開 ディレクトリ: デフォルトでは、
$APP_SERVER_NAME/Struts Example (またはアプリケーション名で指定した名前)
- フォーム入力が完了したら、公開ボタンをクリックします。
- 公開が成功したら、アプリケーションサーバを再起動するために、左枠内の
$APP_SERVER_NAME をクリックします。
右枠内のページに現在のサーバの状態が表示されます。
サーバー再起動ボタンをクリックしてアプリケーションを再起動します。
- 次の URL を入力してブラウザによるサンプルアプリケーションのテストをします:
http://hostname/struts-example/index.jsp
同様の手順を用いて struts-documentation.war をインストールすることができます。
Installing unpacked web applications
パックされていない Web アプリケーションのインストール
The above steps should be followed for applications deployed as *.war files.
For unpacked web applications, configuration involves the following steps:
以上のステップによって *.war ファイルによるアプリケーションの公開を行うことができます
パックされていない Web アプリケーションについては、次のステップを踏む必要があります:
- From the JRun Management Console, select
$APP_SERVER_NAME (on the
left pane) and click on WAR Deployment (on the right pane).
- On the right pane, click on Create an Application and complete the
Web Application Information form as follows:
- JRun Server Name: $APP_SERVER_NAME
- Application Name: myApplication
- Application Hosts: All Hosts
- Application URL: /myApplication
- Application Deploy Directory: will default to
$APP_SERVER_NAME/myApplication
- Click on Create to submit the form.
- Once the web application is created, install and configure the struts
components (struts.jar, struts*.tld, etc) for the web application under
$APP_SERVER_NAME/myApplication/WEB-INF
- Install the remaining components of the application: .class files,
JSP pages,.properties files etc as required.
- To configure the extension mapping of the request URI (ie *.do) to
the action servlet, expand
$APP_SERVER_NAME on the left pane, expand
the Web Applications branch and click on myApplication. The right pane
will display the configuration options for myApplication. Click on
Servlet URL Mappings. A list of existing mappings will be shown. Click
the Edit button and create the following entry:
- Virtual Path/Extension: *.do
- Servlet Invoked: action
- Click on the Update button to save the changes.
- Restart the application server.
- The application should now be accessible from the browser.
- JRun 管理コンソールから、(左枠内の)
$APP_SERVER_NAME
を選択し、(右枠内の) WAR 公開をクリックします。
- 右枠内、アプリケーションの作成をクリックし、
次のようにして Web アプリケーション情報フォームの入力を完了します:
- JRun サーバの名前: $APP_SERVER_NAME
- アプリケーション名: myApplication
- アプリケーション ホスト: すべてのホスト
- アプリケーションの URL: /myApplication
- アプリケーションのルート ディレクトリ: デフォルトでは、
$APP_SERVER_NAME/myApplication
- 作成ボタンをクリックしてフォームを送信します。
- Web アプリケーションが作成されたら、この Web アプリケーションのために Struts コンポーネント
( struts.jar 、 struts*.tld 、など)を
$APP_SERVER_NAME/myApplication/WEB-INF
配下へインストール及び設定します。
- 配備するアプリケーションのコンポーネントをインストールします: .class ファイル、
JSP ページ、 properties ファイルなどが必要です。
- 要求されるアクションサーブレットへの URI の拡張子マッピング(つまりは *.do )を設定するために、
左枠内の
$APP_SERVER_NAME を展開し、さらに Web アプリケーションを展開して
配下の myApplication をクリックします。
右枠内に myApplication の設定オプションが表示されます。
サーブレット URL のマッピングをクリックします。既存のマッピングのリストが表示されます。
編集ボタンをクリックし、次のエントリを作成します:
- 仮想パス/拡張子: *.do
- 呼び出されるサーブレット: action
- 更新ボタンをクリックして変更内容を保存します。
- アプリケーションサーバを再起動します。
- これでブラウザからアプリケーションに接続することができるでしょう。
JRun application server will need to be restarted each time one of the
following changes are made to the web application:
JRun アプリケーションサーバは Web アプリケーションに対して、
以下のような変更を行うたびに再起動しなければなりません:
.class or .jar files are modified
.properties files are modified
.xml files are modified
.class または .jar ファイルの変更
.properties ファイルの変更
.xml ファイルの変更
Patching the struts example application
Struts サンプルアプリケーションにパッチを当てる
As mentioned at the beginning of these notes, the Struts Example Application
will not run under JRun without modification. The following changes will need
to be made:
この文書の冒頭で記述したように、 Struts サンプルアプリケーションは修正を行わなければ
JRun 配下で実行することができません。以下の修正を施す必要があります:
- index.jsp, logon.jsp: Change <html:html locale="true"> to
<html:html locale=<%= true %>>
- registration.jsp, subscription.jsp: Change all instances of filter="true" to
filter=<%= true %>
- index.jsp, logon.jsp: <html:html locale="true"> から
<html:html locale=<%= true %>> へ変更
- registration.jsp, subscription.jsp: 全てのインスタンスで filter="true" から
filter=<%= true %> へ変更
Back to Installation
インストールへ戻る