設定ファイル(.webapp)の作成
|
|
エクスプローラで次のディレクトリにあるdefault_app.webappなるファイルを探す。
x:\Program Files\IBM\VisualAge for Java\ide\project_resources\IBM WebSphere Test Environment\hosts\default_host\default_app\servlets
このファイルはサーブレット
エンジンが立ち上がるときに使われるXML記述の設定ファイルである。ブラウザからの要求によりエンジンがサーブレットをコンテナに組入れる際に使う設定ファイル(.servlet)を本来使うべきであるが、とりあえずこのdefault_app.webappなるファイルにHelloWorldを登録しよう。登録は簡単で、ワードパッドなどのテキストエディタを使ってこのファイルの最後(</webapp>の行の前)に以下の内容を追加しよう。
<servlet>
<name>HelloWorld</name>
<description>This is the first step of
the Servlet Lesson</description>
<code>basic_servlets.HelloWorld</code>
<servlet-path>/HelloWorld</servlet-path>
<init-parameter>
<name></name>
<value></value>
</init-parameter>
<autostart>true</autostart> </servlet> |