リンク はじめに 管理者 アプリケーション開発者 Catalina開発者 Jasper開発者 | Manager App HOW-TO| Introduction |
In many production environments, it is very useful to have the capability
to deploy a new web application, or undeploy an existing one, without having
to shut down and restart the entire container. In addition, you can request
an existing application to reload itself, even if you have not declared it
to be reloadable in the Tomcat 4 server
configuration file.
多くの製品環境では、新しいWebアプリケーションを配備したり、
すでに存在するものの配備を外したりするときに、
コンテナ全体のシャットダウンとリスタートなしで行なうことができるれば、
とても便利です。
その他に、たとえ、Tomcat4のサーバ構成ファイルの中にreloadableを
宣言しなかったとしても、既存のアプリケーション自体にリロードさせるための
要求ができます。
To support these capabilities, Tomcat 4 includes a web application
(installed by default on context path /manager) that supports
the following functions:
これらの機能性をサポートするために、Tomcat 4は以下の機能をサポートする
Webアプリケーション(コンテキスト・パス/managerにデフォルトで
インストールされます)が含まれています。
- Deploy a new web application, on a specified context path, from a
specified directory or WAR file pathname.
- 指定されたディレクトリまたはWARファイル・パス名からの指定された
コンテキスト・パスで、新しいWebアプリケーションを配備する。
- List the currently deployed web applications, as well as the
sessions that are currently active for those web apps.
- 現在配備されているWebアプリケーション
(と現在アクティブであるセッション)
を一覧表示する。
- Cause an existing application to be reloaded.
- 既存のアプリケーションをリロードできるようにする
- Undeploy an existing web application.
- 既存のWebアプリケーションを撤去する
- Stop an existing application (so that it becomes unavailable), but
do not undeploy it.
- 既存のアプリケーションを停止(それが利用できなくなるように)するが、
それを撤去しない。
- Start a stopped application (thus making it available again).
- 停止したアプリケーションを開始する(つまり再び利用できるようにする)
Since Manager is itself a web application, it interacts with
you using standard HTTP requests and responses. However, it's "user interface"
is minimal, because it is intended to be accessed from scripts set up by the
system administrator. For this reason, commands are given as part of the
request URI, and responses are in the form of simple text that can be easily
parsed and processed.
Managerはそれ自身でWebアプリケーションであるので、
それは標準のHTTP要求と応答を使って、あなたと相互にやりとりします。
しかし、それはシステム管理者によって設定されるスクリプトからのアクセスを
意図しているので、「ユーザー・インタフェース」は最低限のものです。
このため、命令は要求URIの一部として与えられます、そして、簡単に解析し、
処理できる単純なテキストの形で、応答が返ります。
Future versions of Tomcat 4 will include administrative functionality that
is presented in (at least) the following forms:
Tomcat 4の将来のバージョンでは、以下の形式に(少なくとも)
提示される管理上の機能を含むことになります
- As web services, so that Tomcat administration can be easily integrated
into remote and/or non-Java mnagement environments.
- Webサービスとして、Tomcat管理を簡単にリモートや非Java管理環境に
統合することができるようにする。
- As a web application with a nice user interface (built on top of the
web services processing layer) for easy Tomcat administration via a
web browser.
- Webブラウザによる簡単なTomcat管理のための素晴らしいユーザー・インタフェース
(Webサービスの処理層のトップで構築する)によるWebアプリケーションとする。
|
| Configuring Manager Application Access |
The description below uses the variable name $CATALINA_HOME
to refer to the directory into which you have installed Tomcat 4,
and is the base directory against which most relative paths are
resolved. However, if you have configured Tomcat 4 for multiple
instances by setting a CATALINA_BASE directory, you should use
$CATALINA_BASE instead of $CATALINA_HOME for each of these
references.
下記の記述は、あなたがTomcat 4をインストールしたディレクトリを参照するために変数名
$CATALINA_HOMEを使います、そして、これに関連するパスは、これを元に解決されます。
しかし、あなたがCATALINA_BASEディレクトリを決めることによって複数のインスタンスのために
Tomcat 4を構成したならば、あなたはこれらのリファレンスの各々のために
$CATALINA_HOMEでなくて$CATALINA_BASEを使うべきです。
It would be quite unsafe to ship Tomcat with default settings that allowed
anyone on the Internet to execute the Manager application on your server.
Therefore, the Manager application is shipped with the requirement that anyone
who attempts to use it must authenticate themselves, using a username and
password that have the role manager associated with them.
Further, there is no username in the default users file
($CATALINA_HOME/conf/tomcat-users.xml) that is assigned this
role. Therefore, access to the Manager application is completely disabled
by default.
インターネット上で誰でも許可できるように、デフォルトの設定で
あなたのサーバーでManagerアプリケーションを実行するように、
Tomcatを出荷することはでは非常に危険です。
したがって、Managerアプリケーションは、それを使おうとする誰でも彼ら自身
(役割managerに関連するユーザー名とパスワードを使用すること)
を認証しなければならない必要条件で出荷しました。
さらに、この役割を割り当てられるデフォルトのユーザー・ファイル
($CATALINA_HOME/conf/tomcat-users.xml)の中に、ユーザー名は存在していません。
したがって、Managerアプリケーションへのアクセスは、デフォルトで完全に無効となります。
To enable access to the Manager web application, you must either create
a new username/password combination and associate the role name
manager with it, or add the manager role
to some existing username/password combination. Exactly where this is done
depends on which Realm implementation you are using:
Manager Webアプリケーションへのアクセスを可能にするために、あなたは、
新しいユーザー名/パスワード組合せをつくって、そして、それによる役割名
managerを関連して現存の若干のユーザー名/パスワード組合せへの
manager役割を加えなければなりません。
これが正しく行なわれるかどうかは、
あなたがどのRealm実装を使っているかに依存します。
- MemoryRealm - If you have not customized your
$CATALINA_HOME/conf/server.xml to select a different one,
Tomcat 4 defaults to an XML-format file stored at
$CATALINA_HOME/conf/tomcat-users.xml, which can be
edited with any text editor. This file contains an XML
<user> for each individual user, which might
look something like this:
あなたが別なものを選択するためにあなたの$CATALINA_HOME/conf/server.xml
をカスタマイズしなければ、Tomcat 4は、デフォルトで、
$CATALINA_HOME/conf/tomcat-users.xml
のXML-形式のファイルに保存します。
そして、それはどんなテキスト・エディタででも編集することができます。
このファイルは個々のユーザーのためにXML < user> を含みます。
そして、それはことように見えるかもしれません:
 |  |  |  |
<user name="craigmcc" password="secret" roles="standard,manager">
|  |  |  |  |
which defines the username and password used by this individual to
log on, and the role names he or she is associated with. You can
add the manager role to the comma-delimited
roles attriute for one or more existing users, and/or
create new users with that assigned role.
そしてそれは、記録するこの個人と彼または彼女が関連される役割名によって使われるユーザー名とパスワードを定義します。
あなたは、manager役割を一つ以上の現存のユーザーのためのコンマで区切られたroles属性に加えることができておよび/またはその割り当てられた役割で新しいユーザーをつくることができます。
- JDBCRealm - Your user and role information is stored in
a database accessed via JDBC. Add the manager role
to one or more existing users, and/or create one or more new users
with this role assigned, following the standard procedures for your
environment.
あなたのユーザーと役割情報は、JDBCを通してアクセスされるデータベースに格納されます。
一つ以上の現存のユーザーへのmanager役割を加えておよび/または割り当てられるこの役割をもつ一つ以上の新しいユーザーをつくります(あなたの環境の標準の手続きに従って)。
- JNDIRealm - Your user and role information is stored in
a directory server accessed via LDAP. Add the manager
role to one or more existing users, and/or create one or more new users
with this role assigned, following the standard procedures for your
environment.
あなたのユーザーと役割情報は、LDAPを通してアクセスされるディレクトリ・サーバーに保存されます。
一つ以上の現存のユーザーへのmanager役割を加えておよび/または割り当てられるこの役割をもつ一つ以上の新しいユーザーをつくります(あなたの環境の標準の手続きに従って)。
The first time you attempt to issue one of the Manager commands
described in the next section, you will be challenged to logn on, using
BASIC authentication. The username and password you enter do not matter,
as long as they identify a valid user in the users database who possesses
the role manager.
あなたが次のセクションで記述されるマネージャー命令のうちの1つを出そうとする最初の時、
あなたはログインするために、基本認証を使用した認証をうけます。
役割managerを所有するユーザー・データベースにおいて、
彼らが有効なユーザーの身元を確認する限り、
あなたが入るユーザー名とパスワードは重要ではありません。
|
| Supported Manager Commands |
All commands that the Manager application knows how to process are
specified in a single request URI like this:
Managerアプリケーションが処理する方法を知っている全ての命令は、
このように一つの要求URIで指定されます:
 |  |  |  |
http://{host}:{port}/manager/{command}?{parameters}
|  |  |  |  |
where {host} and {port} represent the hostname
and port number on which Tomcat is running, {command}
represents the Manager command you wish to execute, and
{parameters} represents the query parameters
that are specific to that command. In the illustrations below, customize
the host and port appropriately for your installation.
ここで、{host}と{port}は、
Tomcatが実行されているホスト名とポート番号を表し、
{command}はあなたが実行したいマネージャー命令を表します、
そして、{parameters}は、その命令に特有のクエリパラメータを表します。
下記のイラストにおいて、あなたのインストールのために適切にホストとポートをカスタマイズしてください。
Most commands accept one or more of the following query parameters:
大部分の命令は、それに続くひとつ以上のクエリパラメータを受け入れます
- path - The context path (including the leading slash)
of the web application you are dealing with. To select the ROOT web
application, specify a zero-length string. NOTE -
It is not possible to perform administrative commands on the
Manager application itself.
- path -
あなたが扱っているWebアプリケーションのコンテキストパス(前のスラッシュを含むこと)。
ROOT Webアプリケーションを選択するために、ゼロ-長ストリングを指定してください。
注意 - Managerアプリケーションで管理上の命令を実行することは、
可能ではありません。
- war - URL of a web application archive (WAR) file,
or pathname of a directory, that contains the web application.
You can use URLs in any of the following formats:
Webアプリケーション・アーカイブ(WAR)ファイルのURLまたは
Webアプリケーションを含むディレクトリのパス名。
あなたは、以下のフォーマットのどのURLでも使うことができます。
- file:/absolute/path/to/a/directory - The absolute
path of a directory that contains the unpacked version of a web
application. This directory will be attached to the context path
you specify without any changes.
- file:/absolute/path/to/a/directory -
Webアプリケーションのunpackされたバージョンを含むディレクトリの絶対パス。
このディレクトリは、あなたがどんな変更点なしででも指定するコンテキスト・パスに付けられることになります。
- jar:file:/absolute/path/to/a/warfile.war!/ - The
URL to a local web application archive (WAR) file. You can use any
syntax that is valid for the
JarURLConnection class
for reference to an entire JAR file.
- jar:file:/absolute/path/to/a/warfile.war!/ -
ローカルWebアプリケーション・アーカイブ(WAR)ファイルへのURL。
あなたは、全てのJARファイルの参照のために
JarURLConnectionクラスにあてはまるどんな構文でも使うことができます。
- jar:http://hostname:port/path/to/a/warfile.war!/ -
You can also deploy web applications from a remote JAR file. You can
use any syntax that is valid for the
JarURLConnection
class for reference to an entire JAR file.
- jar:http://hostname:port/path/to/a/warfile.war!/ -
あなたは、また、リモートJARファイルからWebアプリケーションを展開することができます。
あなたは、全てのJARファイルの参照のために
JarURLConnectionクラスにあてはまるどんな構文でも使うことができます。
Each command will return a response in text/plain format
(i.e. plain ASCII with no HTML markup), making it easy for both humans and
programs to read). The first line of the response wil begin with either
OK or FAIL, indicating whether the requested
command was successful or not. In the case of failure, the rest of the first
line will contain a description of the problem that was encountered. Some
commands include additional lines of information as described below.
各命令は、text/plainフォーマット(すなわちHTMLマークアップのない普通のASCII)で応答に人間とプログラムが読むことを簡単にすることを返すことになります)。
要求された命令が成功したかどうかを明示するため応答の最初の行には、
OKまたはFAILが戻ります。
失敗の場合、最初の行の残りは、遭遇した問題の記述を含むことになります。
いくつかの命令は、下記のように情報の追加の行を含みます。
Internationalization Note - The Manager application looks up
its message strings in resource bundles, so it is possible that the strings
have been translated for your platform. The examples below show the English
version of the messages.
国際化注 - Managerアプリケーションはリソース・バンドルでその
メッセージ文字列を取得するので、文字列があなたのプラットホームにあわせて
翻訳さている場合があります。
下の例は、メッセージの英語のバージョンを示します。
| Deploy A New Application |
 |  |  |  |
http://localhost:8080/manager/install?path=/foo&war=file:/path/to/foo
http://localhost:8080/manager/install?path=/bar&war=jar:file:/path/to/bar.war!/
|  |  |  |  |
Install and start a new web application, attached to the specified context
path (which must not be in use by any other web application). The
war parameter specifies a URL (including the file:
scheme) for either a directory or a web application archive (WAR) file.
The supported syntax for a URL referring to a WAR file is described on the
Javadocs page for the java.net.JarURLConnection class. Use
only URLs that refer to the entire WAR file.
新しいWebアプリケーション(指定されたコンテキスト・パス(それは、他のどのWebアプリケーションも使用していないものでなければならない)に付けられる)をインストールして、開始します。
warパラメータは、ディレクトリかWebアプリケーションのためのURL(file:スキームを含むこと)が(WAR)ファイルをアーカイブするように指定します。
WARファイルを呼び出すURLのためのサポートされた構文は、
java.net.JarURLConnectionクラスのために、Javadocsページの上で記述されます。
全WARファイルを呼ぶURLだけを使ってください。
If installation and startup is successful, you will receive a response
like this:
インストールと開始に成功した場合、このような応答を受け取ります
 |  |  |  |
OK - Installed application at context path /foo
|  |  |  |  |
Otherwise, the response will start with FAIL and include an
error message. Possible causes for problems include:
そうでなければ、応答はFAILから開始され、エラー・メッセージが含まれます。
問題の原因が含む可能性
- Application already exists at path /foo
The context paths for all currently running web applications must be
unique. Therefore, you must either undeploy the existing web application
using this context path, or choose a different context path for the
new one.
Webアプリケーションを現在実行している全てのコンテキスト・パスは、
ユニークでなければならない。
したがって、あなたは、このコンテキストパスを利用している既存のWebアプリケーション
を撤去するか、これとは別の新しいコンテキストパスを選択しなければなりません。
- Document base does not exist or is not a readable directory
The URL specified by the war parameter must identify a
directory on this server that contains the "unpacked" version of a
web application, or the absolute URL of a web application archive (WAR)
file that contains this application. Correct the value specified by
the war parameter.
Webアプリケーションの「unpackされた」バージョンまたはこのアプリケーションを含むWebアプリケーション・アーカイブ(WAR)ファイルの絶対のURLを含むこのサーバーで、warパラメータによって指定されるURLは、ディレクトリを確認しなければなりません。
warパラメータによって指定される値を訂正してください。
- Encountered exception
An exception was encountered trying to start the new web application.
Check the Tomcat 4 logs for the details, but likely explanations include
problems parsing your /WEB-INF/web.xml file, or missing
classes encountered when initializing application event listeners and
filters.
新しいWebアプリケーションを開始しようとして、例外に遭遇されました。
アプリケーション・イベント・リスナーとフィルタを初期化するとき、Tomcat 4が詳細のために記録するチェック、しかし、ありそうな説明はあなたの/WEB-INF/web.xmlファイルを解析しているか、遭遇されるクラスを見のがしている問題を含みます。
- Invalid application URL was specified
The URL for the directory or web application that you specified
was not valid. Such URLs must start with file:, and URLs
for a WAR file must end in ".war".
ディレクトリのURLまたはあなたが指定したWebアプリケーションは、有効ではありませんでした。
そのようなURLは、file:で開始して、WARファイルの終わりは「.war」でなければなりません。
- Invalid context path was specified
The context path must start with a slash character, unless you are
referencing the ROOT web application -- in which case the context path
must be a zero-length string.
あなたがROOT Webアプリケーション(コンテキスト・パスはどの場合でなければならないか、ゼロ-長ストリング)にリファレンスをつけていない限り、コンテキスト・パスは、スラッシュ文字から始めなければなりません。
- No context path was specified
The path parameter is required.
pathパラメータが必要です。
|
| Reload An Existing Application |
 |  |  |  |
http://localhost:8080/manager/reload?path=/examples
|  |  |  |  |
Signal an existing application to shut itself down and reload. This can
be useful when you've recompiled classes on an application that is not
configured with the reloadable="true" attribute in its
<Context> entry in
$CATALINA_HOME/conf/server.xml, or when you've made other
changes (such as to conf/web.xml) that are not automatically
recognized by Tomcat.
既存のアプリケーションをシャットダウンしてリロードするために通知する。
あなたが$CATALINA_HOME/conf/server.xmlでその< Context> エントリでreloadable="true"属性で、構成されないアプリケーションまたはあなたがTomcatによって自動的に認識されない他の変更点(例えばconf/web.xmlに)を作った時の上でクラスを再コンパイルしたとき、これは役に立つことがあります。
If this command succeeds, you will see a response like this:
この命令が成功するならば、このような応答を見ることになります
 |  |  |  |
OK - Reloaded application at context path /examples
|  |  |  |  |
Otherwise, the response will start with FAIL and include an
error message. Possible causes for problems include:
そうでなければ、応答はFAILから開始され、エラー・メッセージが含まれます。
問題の原因が含む可能性
- Encountered exception
An exception was encountered trying to restart the web application.
Check the Tomcat 4 logs for the details.
Webアプリケーションをリスタートしようと試みて例外に遭遇しました。
詳細は、Tomcat 4のログを確認してください。
- Invalid context path was specified
The context path must start with a slash character, unless you are
referencing the ROOT web application -- in which case the context path
must be a zero-length string.
あなたがROOT Webアプリケーション(コンテキスト・パスはどの場合でなければならないか、ゼロ-長ストリング)にリファレンスをつけていない限り、コンテキスト・パスは、スラッシュ文字から始めなければなりません。
- No context exists for path /foo
There is no deployed application on the context path that you
specified.
配備されたアプリケーションが、あなたが指定したコンテキスト・パスにはありません。
- No context path was specified
The path parameter is required.
pathパラメータが必要です。
|
| Start an Existing Application |
 |  |  |  |
http://localhost:8080/manager/start?path=/examples
|  |  |  |  |
Signal a stopped application to restart, and make itself available again.
Stopping and starting is useful, for example, if the database required by
your application becomes temporarily unavailable. It is usually better to
stop the web application that relies on this database, rather than letting
users continuously encounter database exceptions.
停止したアプリケーションをリスタートするよう通知する。
そして、もう一度それ自体を利用できるようにする。
例えば、あなたのアプリケーションで必要なデータベースが一時的に利用できなくなるならば、
停止と開始は役に立ちます。
通常、このデータベースに依存するWebアプリケーションを停止することは、
常にユーザーにデータベース例外をさらすより良いです。
If this command succeeds, you will see a response like this:
この命令が成功するならば、あなたはこのように応答を見ることになります
 |  |  |  |
OK - Started application at context path /examples
|  |  |  |  |
Otherwise, the response will start with FAIL and include an
error message. Possible causes for problems include:
そうでなければ、応答はFAILから開始され、エラー・メッセージを含みます。
問題の原因が含む可能性
- Encountered exception
An exception was encountered trying to undeploy the web application.
Check the Tomcat 4 logs for the details.
Webアプリケーションを撤去しようとして例外を検出しました。
詳細は、Tomcat 4のログを調べてください。
- Invalid context path was specified
The context path must start with a slash character, unless you are
referencing the ROOT web application -- in which case the context path
must be a zero-length string.
あなたがROOT Webアプリケーション(コンテキスト・パスはどの場合でなければならないか、ゼロ-長ストリング)にリファレンスをつけていない限り、コンテキスト・パスは、スラッシュ文字から始めなければなりません。
- No context exists for path /foo
There is no deployed application on the context path that you
specified.
配備されたアプリケーションが、あなたが指定したコンテキスト・パスにはありません。
- No context path was specified
The path parameter is required.
pathパラメータが必要です。
|
| Stop an Existing Application |
 |  |  |  |
http://localhost:8080/manager/stop?path=/examples
|  |  |  |  |
Signal an existing application to make itself unavailable, but leave it
deployed. Any request that comes in while an application is stopped will
see an HTTP error 404, and this application will show as "stopped" on a
list applications command.
その利用をできなくしますが、配備されたままにしておくために、
現存のアプリケーションに通知します。
何でも、アプリケーションが止められるが、それが入ることを要請しますリスト・アプリケーション命令の上で「止められ」て、エラー404とこのアプリケーションが示すことになるHTTPを見ることになります。
If this command succeeds, you will see a response like this:
この命令が成功するならば、あなたはこのように応答を見ることになります
 |  |  |  |
OK - Stopped application at context path /examples
|  |  |  |  |
Otherwise, the response will start with FAIL and include an
error message. Possible causes for problems include:
そうでなければ、応答はFAILから開始され、エラー・メッセージを含みます。
問題の原因が含む可能性
- Encountered exception
An exception was encountered trying to undeploy the web application.
Check the Tomcat 4 logs for the details.
Webアプリケーションを撤去しようとして例外を検出しました。
詳細については、Tomcat 4のログを調べてください。
- Invalid context path was specified
The context path must start with a slash character, unless you are
referencing the ROOT web application -- in which case the context path
must be a zero-length string.
あなたがroot Webアプリケーション(コンテキスト・パスはどの場合でなければならないか、ゼロ-長ストリング)にリファレンスをつけていない限り、コンテキスト・パスは、スラッシュ文字から始めなければなりません。
- No context exists for path /foo
There is no deployed application on the context path that you
specified.
配備されたアプリケーションが、あなたが指定したコンテキスト・パスにはありません。
- No context path was specified
The path parameter is required.
pathパラメータが必要です。
|
| Undeploy an Existing Application |
 |  |  |  |
http://localhost:8080/manager/remove?path=/examples
|  |  |  |  |
Signal an existing application to gracefully shut itself down, and then
remove it from Tomcat (which also makes this context path available for
reuse later).
美しくそれ自体をシャットダウンするために、現存のアプリケーションに通知します。
それから、Tomcatからそれを削除し、また、後でこのコンテキスト・パスを
再利用にできるようにします。
If this command succeeds, you will see a response like this:
この命令が成功すれば、このような応答を見ることになります
 |  |  |  |
OK - Removed application at context path /examples
|  |  |  |  |
Otherwise, the response will start with FAIL and include an
error message. Possible causes for problems include:
そうでなければ、応答はFAILから開始され、エラー・メッセージを含みます。
問題の原因が含む可能性
- Encountered exception
An exception was encountered trying to undeploy the web application.
Check the Tomcat 4 logs for the details.
Webアプリケーションを撤去しようとして例外に遭遇しました。
詳細については、Tomcat 4のログを調べてください。
- Invalid context path was specified
The context path must start with a slash character, unless you are
referencing the ROOT web application -- in which case the context path
must be a zero-length string.
あなたがROOT Webアプリケーション(コンテキスト・パスはどの場合でなければならないか、ゼロ-長ストリング)にリファレンスをつけていない限り、コンテキスト・パスは、スラッシュ文字から始めなければなりません。
- No context exists for path /foo
There is no deployed application on the context path that you
specified.
配備されたアプリケーションが、あなたが指定したコンテキスト・パスにはありません。
- No context path was specified
The path parameter is required.
pathパラメータが必要です。
|
|
|