Interstage Application Server J2EE ユーザーズガイド |
目次
索引
![]() ![]() |
第2部 Servlet/JSP編 | > 第11章 Servletサービスの環境定義ファイル | > 11.6 Webアプリケーション環境定義ファイル(deployment descriptor) | > 11.6.3 Webアプリケーション環境定義ファイル(deployment descriptor)のタグの詳細 |
URLにファイル名を入力しなかった場合に表示するファイル(welcome file)を定義できます。
welcome fileは、URLにWebアプリケーション識別子まで指定した場合や、Webアプリケーションのルートディレクトリからの相対パスとしてディレクトリ名まで指定した場合のどちらにも有効です。
welcome fileを定義せずにファイル名を省略した場合、サーブレット・コンテナ環境定義ファイルで記述するContext定義のdirList属性の指定により、その実体となるディレクトリ配下のディレクトリやファイルの一覧、またはステータスコード404(ファイルが存在しない)が表示されます。
welcome fileは、welcome-file-listタグで定義します。welcome fileは複数指定ができ、記述した順に有効となります。
------------------------------------------------------------------------------- <welcome-file-list> <welcome-file> filename </welcome-file> </welcome-file-list> -------------------------------------------------------------------------------
タグ名 |
説明 |
タグの |
複数の |
---|---|---|---|
welcome-file |
welcome fileを定義します。 |
× |
○ |
------------------------------------------------------------------------------- <web-app> <welcome-file-list> <welcome-file> index.jsp </welcome-file> <welcome-file> index.htm </welcome-file> </welcome-file-list> </web-app> -------------------------------------------------------------------------------
目次
索引
![]() ![]() |