LoginSignup
1
0

WebSphere Libertyのウェルカム・ページを無効化する方法

Posted at

コンテキスト・ルートの「/」にバインドされているアプリケーションがない場合、デフォルトの Liberty プロファイル・ウェルカム・ページが使用可能になります。
たとえば http://localhost:9080/ にアクセスすると下記ページが表示されます。

Screenshot 2023-12-01 at 10-14-31 WebSphere Liberty 23.0.0.8.png

無効化の設定

HTTP ディスパッチャー (httpDispatcher) の enableWelcomePage="false" の設定で無効化することができます。

<httpDispatcher enableWelcomePage="false"/>

設定後の画面
Screenshot 2023-12-01 at 11-00-21 404 Not Found.png

appOrContextRootMissingMessage のメッセージの設定

appOrContextRootMissingMessage にメッセージを設定することもできます。

<httpDispatcher enableWelcomePage="false" appOrContextRootMissingMessage="Welcome Page is disabled."/>

設定後の画面
Screenshot 2023-12-01 at 11-03-53 404 Not Found.png

appOrContextRootMissingMessage でリダイレクトする設定

appOrContextRootMissingMessageでリダイレクトの設定もできます。WelcomeTestアプリケーションのウェルカム・ページを表示する設定例です。

<httpDispatcher enableWelcomePage="false" appOrContextRootMissingMessage='&lt;script&gt;document.location.href="/WelcomeTest/";&lt;/script&gt;' />

参考文書

HTTP ディスパッチャー (httpDispatcher)
https://www.ibm.com/docs/ja/was-liberty/core?topic=SSD28V_liberty/com.ibm.websphere.liberty.autogen.nd.doc/ae/rwlp_config_httpDispatcher.htm

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0