LoginSignup
0
1

More than 1 year has passed since last update.

Tomcatをコマンドラインで操作するのに必要なこと

Last updated at Posted at 2023-02-02

主にホットリロード目的。
大抵のサイトには

http://localhost:8080/manager/text/relaod?path=<your_path>

を叩けと書いてあります。ちなみにGETです。
Basic認証がかかっているなら

curl -XGET -u <user>:<password> http://localhost:8080/manager/text/relaod?path=<your_path>

こんな感じです。
しかし私の場合403になってしまい、なぜ…と思っていたら tomcat-users.xml にユーザーの追加が必要でした。

<role rolename="manager-script"/>
<user password="<password>" roles="manager-script" username="<username>"/>

こんな具合に。
manager-guiのロールがいるならそれとは別に記載する必要がありますよ。

0
1
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
0
1