Server: Windows 2000 Server with WebSphere 3.5.3 Advanced
サーバー: Windows 2000 Server と WebSphere 3.5.3 以上
- Start up the adminserver.
- Start up Admin Console.
- Use the Convert War file task to convert the struts-example.war from the
struts-b1 distrib as-is.
- Convert to the default_server, default servlet engine and standard
install directory (c:\websphere\appserver\hosts\default_host).
- Create a WEB-INF directory in the servlets dir and copy
struts-config.xml, database.xml AND web.xml into it (Keep WEB-INF with all
the TLD's under web - both WEB-INF directories must be present).
- Copy jaxp 1.0.1's (NOT 1.1.1's) jaxp.jar and parser.jar to the servlets
directory of the strut-example webapp.
- In the servlets directory, open struts.jar with WinZip. Extract the
three DTD's (struts-config_1_0.dtd, web-app_2_2.dtd and web-app_2_3.dtd)
into the servlets directory making sure you use folder names (so the files
extract to servlets/org/apache/struts/resources).
- Click on struts-example in the Admin Console under Default Server/Default
Servlet Engine and click the advanced tab on the right hand side of the
screen.
- Down where it says Default Error Page, enter /ErrorReporter and then
click Apply.
- Start the Default Server via the Admin Console. You should see a whole
bunch of ActionServlet messages in the default_host_stdout.log file with no
exceptions.
- Via a browser accessed the app using
http://localhost/struts-example/index.jsp.
- If it returns "Application not Available" then go back to the Admin
Console, right-click on struts-example and select Restart WebApp.
- Once it reports success, go back to the URL above and try again - it
should work flawlessly.
- adminserverを起動します。
- 管理コンソールを起動します。
- struts-b1ディストリビューション等に含まれるstruts-example.warをConvert War Fileタスクで
変換します。
- default_server、default servlet engine、standard install directory (c:\WebSphere\AppServer\hosts\default_host)
を編集します。
訳者注:
デフォルトではc:\WebSphere\AppServer\hosts\default_host以下に生成される、struts-example以下を編集するという意味のようです。
このディレクトリ以下には"servlets"ディレクトリ、"web"ディレクトリが生成されています。"web"ディレクトリの配下に
"WEB-INF"ディレクトリが生成されているのですが"servlets"ディレクトリ以下にも作成し、設定する必要があるようです。
- WEB-INFディレクトリーを"servlets"ディレクトリー内に生成し、その中に
struts-config.xml、database.xml、web.xmlをコピーします。
("web"ディレクトリ下のWEB-INFディレクトリ内のTLDファイルは消さないでください - 両方のWEB-INFディレクトリが必要です).
- jaxp 1.0.1の (1.1.1のではなく) jaxp.jarとparser.jarをstruts-example Webアプリケーションの
"servlets"ディレクトリにコピーします。
- servletsディレクトリでstruts.jarをWinZipを使って開きます。
3つのDTDファイル(struts-config_1_0.dtd、web-app_2_2.dtd、web-app_2_3.dtd)を取り出し、
servletsディレクトリ内に該当のフォルダ(servlets/org/apache/struts/resources)
を作成して配置します。
- 管理コンソール内の"Default Server->Default Servlet Engine"の下にある
struts-exampleをクリックした後、右側の画面内の"拡張"タブをクリックします。
- エラー・ページの項目に、"/ErrorReporter"と入力して"適用"をクリックします。
- 管理コンソールを使用してDefault Serverを開始します。
default_host_stdout.log ファイルを見てActionServlet郡が例外の発生を報告していないことを確認します。
- ブラウザを使って http://localhost/struts-example/index.jsp に対してアクセスを行います。
- もし "Application not Available" と表示されたら管理コンソールに戻り、
struts-exampleを右クリックして"Webアプリケーションの最始動"を選択してください。
- リスタートが成功したと表示されたら、もう1度ブラウザから先程のURLにアクセスしてください。
ちゃんと動作するはずです。
For whatever reason, some installations do not like XML files that reference
PUBLIC DTD's - if in looking at the default_host_stdout.log file you see
errors about invalid public URL references during DTD registrations, or if
your pages say "cannot find //logon or //saveRegistration" (ie. action
mappings) then do the following:
いくつかの理由からPUBLIC DTDを参照するXMLファイルのインストール作業をうまく行うことが出来ません -
もしdefault_host_stdout.logファイルの中にDTDレジストレーションの中のpublic URLの参照が不正であるという
エラーを見つけた場合、 または表示されたページの中に"cannot find //logon or //saveRegistration" (つまりaction
mappingsが見つからない)と表示された場合には、以下の手順に従ってください。:
- Stop Default Server
- Go to servlets\WEB-INF\ and edit web.xml and struts_config.xml.
- In the DOCTYPE declaration, change the word PUBLIC to SYSTEM and
completely remove the line that reads "-//Sun Microsystems, Inc.//DTD Web
Application 2.2//EN" from web.xml and remove "-//Apache Software
Foundation//DTD Struts Configuration 1.0//EN" from struts-config.xml.
- Save these changes and go back to step 10 above.
- Default Serverを停止します。
- servlets\WEB-INF\ にあるweb.xmlとstruts_config.xmlを編集します。
- DOCTYP 宣言の中のPUBLICの記述をSYSTEMに変更します。
web.xmlから"-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"と書かれている行を削除します。
struts-config.xmlから"-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"の記述を削除します。
- 変更を保存し、手順10に戻ります。
Just as a troubleshooting guide -
トラブルが発生した際のガイド -
If you are getting errors like "Cannot find ActionMappings, etc..." or
"Cannot find key org.apache.struts.MESSAGE" then your application is most
likely still bombing on the struts-config issue that Richard discovered.
The above steps SHOULD correct that leaving nothing out. If you are getting
404 errors about //logon or something not found, then you are still having
XML config troubles and it is not initializing the Action servlet properly.
Follow the steps above in regards to DTD's and it should work.
もし "Cannot find ActionMappings, etc..." または
"Cannot find key org.apache.struts.MESSAGE" のようなエラーが発生した場合、
アプリケーションはRichard の発見したstruts-configの問題を解決できていない可能性が高いと思われます。
上記の項目が正しく行われていることを確認してください。
もし "//logon or something not found"というような404エラーが発生した場合には
XMLの設定に問題があるためActionサーブレットのプロパティの初期化が行われていません。
上記DTDに関する項目にしたがって対処してください。
As a final thought, I obviously haven't gotten to test too much but I don't
believe that there are ANY coding changes that need to be made to the actual
struts source. Everything about getting it to work in WebSphere has been a
WebSphere configuration issue thus far (and I don't think I'll be having any
more).
最後に、私は確かに十分なテストを行っていませんが、実際のStrutsソースに対しコード修正が必要であるとは「まったく」思っていません。
WebSphere上でStrutsを動作させる際の問題は、ここまでのとおり全てWebSphereの設定に関するものでした。
(そして、これ以上は問題があるとは思いません)
If changing the DTD's to SYSTEM, do so ONLY AFTER using the Convert a War
util. Ant doesn't seem to like it the other way! :)
もしDTD内の記述をSYSTEMに変更する場合には、必ずConvert a Warユーティリティを使用した後に
行うようにしてください。Antは反対にこれを処理できないようです! :)
インストールへ戻る