<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ja">
	<id>https://wiki.archlinux.jp/index.php?action=history&amp;feed=atom&amp;title=Tomcat</id>
	<title>Tomcat - 版の履歴</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.archlinux.jp/index.php?action=history&amp;feed=atom&amp;title=Tomcat"/>
	<link rel="alternate" type="text/html" href="https://wiki.archlinux.jp/index.php?title=Tomcat&amp;action=history"/>
	<updated>2026-05-12T11:57:21Z</updated>
	<subtitle>このウィキのこのページに関する変更履歴</subtitle>
	<generator>MediaWiki 1.44.3</generator>
	<entry>
		<id>https://wiki.archlinux.jp/index.php?title=Tomcat&amp;diff=10207&amp;oldid=prev</id>
		<title>Kusakata.bot: 文字列「Tips and tricks」を「ヒントとテクニック」に置換</title>
		<link rel="alternate" type="text/html" href="https://wiki.archlinux.jp/index.php?title=Tomcat&amp;diff=10207&amp;oldid=prev"/>
		<updated>2017-10-12T14:16:24Z</updated>

		<summary type="html">&lt;p&gt;文字列「Tips and tricks」を「ヒントとテクニック」に置換&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ja&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← 古い版&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2017年10月12日 (木) 23:16時点における版&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;113行目:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;113行目:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;上流のようにログを保存したい場合、systemd ファイル {{ic|/lib/systemd/system/tomcat7.service}} を {{ic|/etc/systemd/system/tomcat7.service}} にコピーして、ログファイルの絶対パスを指定する {{ic|SYSLOG}} を変更してください。&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;上流のようにログを保存したい場合、systemd ファイル {{ic|/lib/systemd/system/tomcat7.service}} を {{ic|/etc/systemd/system/tomcat7.service}} にコピーして、ログファイルの絶対パスを指定する {{ic|SYSLOG}} を変更してください。&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== ヒントとテクニック ==&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Tips and tricks ==&lt;/div&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;基本的な設定はバーチャルホストのウェブアプリケーションで行うことができます: http://localhost:8080/host-manager/html 。{{ic|tomcat-users.xml}} で設定したユーザー名とパスワードを使ってください。他のオプションについては {{ic|/etc/tomcat7}} の設定ファイル (特に {{ic|server.xml}}) で変更できます。詳しくは [http://tomcat.apache.org/tomcat-7.0-doc/index.html Tomcat 7 の公式ドキュメント] を参照。&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;基本的な設定はバーチャルホストのウェブアプリケーションで行うことができます: http://localhost:8080/host-manager/html 。{{ic|tomcat-users.xml}} で設定したユーザー名とパスワードを使ってください。他のオプションについては {{ic|/etc/tomcat7}} の設定ファイル (特に {{ic|server.xml}}) で変更できます。詳しくは [http://tomcat.apache.org/tomcat-7.0-doc/index.html Tomcat 7 の公式ドキュメント] を参照。&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;!-- diff cache key bnbest_wiki:diff:1.41:old-8422:rev-10207:wikidiff2=table:1.14.1:bc2a06be --&gt;
&lt;/table&gt;</summary>
		<author><name>Kusakata.bot</name></author>
	</entry>
	<entry>
		<id>https://wiki.archlinux.jp/index.php?title=Tomcat&amp;diff=8422&amp;oldid=prev</id>
		<title>Kusakata: 同期</title>
		<link rel="alternate" type="text/html" href="https://wiki.archlinux.jp/index.php?title=Tomcat&amp;diff=8422&amp;oldid=prev"/>
		<updated>2017-04-06T12:05:43Z</updated>

		<summary type="html">&lt;p&gt;同期&lt;/p&gt;
&lt;a href=&quot;https://wiki.archlinux.jp/index.php?title=Tomcat&amp;amp;diff=8422&amp;amp;oldid=5381&quot;&gt;差分を表示&lt;/a&gt;</summary>
		<author><name>Kusakata</name></author>
	</entry>
	<entry>
		<id>https://wiki.archlinux.jp/index.php?title=Tomcat&amp;diff=5381&amp;oldid=prev</id>
		<title>2016年6月17日 (金) 13:38にKusakataによる</title>
		<link rel="alternate" type="text/html" href="https://wiki.archlinux.jp/index.php?title=Tomcat&amp;diff=5381&amp;oldid=prev"/>
		<updated>2016-06-17T13:38:44Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ja&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← 古い版&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2016年6月17日 (金) 22:38時点における版&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;98行目:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;98行目:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== webapps フォルダ以外にあるファイルをホスト ===&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== webapps フォルダ以外にあるファイルをホスト ===&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{ic|Context}} を作成することで、プロジェクトを webapps フォルダ以外に配置することができます。{{ic|/etc/tomcat&amp;lt;number&amp;gt;/Catalina/localhost/}} を開いてコンテキストを作成してください。コンテキストはシンプルな xml ファイルで、tomcat が参照するべきディレクトリを指定します。ファイルの基本的なフォーマットは以下のようになっています:&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you want to keep your project outside the webapps folder this is possible by creating a {{ic|Context}}. &lt;/div&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Go to {{ic|/etc/tomcat&amp;lt;number&amp;gt;/Catalina/localhost/}} and create your context. A context is a simple xml file which specifies where tomcat should look for the project. The basic format of the file is&lt;/div&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{hc|/etc/tomcat7/Catalina/localhost/whatShouldFollowLocalhost.xml|2=&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{hc|/etc/tomcat7/Catalina/localhost/whatShouldFollowLocalhost.xml|2=&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;Context path=&quot;/whatSholdFollwLocalhost&quot; docBase=&quot;/where/your/project/is/&quot; reloadable=&quot;true&quot;/&amp;gt;&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;Context path=&quot;/whatSholdFollwLocalhost&quot; docBase=&quot;/where/your/project/is/&quot; reloadable=&quot;true&quot;/&amp;gt;&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;実際の例は以下です。ユーザーの {{ic|/home}} フォルダにプロジェクトを配置しています:&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;A working example is as follows. This assumes that the project is hosted somewhere in the users /home-folder.&lt;/div&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{hc|/etc/tomcat7/Catalina/localhost/myProject.xml|2=&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{hc|/etc/tomcat7/Catalina/localhost/myProject.xml|2=&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;Context path=&quot;/myProject&quot; docBase=&quot;/home/archie/code/jsp/myProject&quot; reloadable=&quot;true&quot;/&amp;gt;&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;Context path=&quot;/myProject&quot; docBase=&quot;/home/archie/code/jsp/myProject&quot; reloadable=&quot;true&quot;/&amp;gt;&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;上記のように設定すると {{ic|/home/archie/code/jsp/myProject/}} にプロジェクトのファイルを置くことができ、ウェブブラウザでプロジェクトを確認したいときは[http://localhost:8080/myProject http://localhost:8080/myProject] を開きます。tomcat がファイルをロードできない場合、おそらくパーミッションに問題があります。{{ic|chmod o+x /home/archie/code/jsp/myProject}} を実行してください。&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The files can now be hosted in {{ic|/home/archie/code/jsp/myProject/}}. To see the project in your webbrowser, go to [http://localhost:8080/myProject http://localhost:8080/myProject].&lt;/div&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If tomcat is unable to load the files, it might be an issue with permissions. {{ic|chmod o+x /home/archie/code/jsp/myProject}} should fix the issue.&lt;/div&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== ログ ==&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== ログ ==&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;117行目:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;115行目:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Tips and tricks ==&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Tips and tricks ==&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Basic configuration can be made through the virtual host manager web application&lt;/del&gt;: http://localhost:8080/host-manager/html&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;. Provide the username/password you set in&lt;/del&gt; {{ic|tomcat-users.xml}}&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;. Other options are tweaked in configuration files&lt;/del&gt; &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;in&lt;/del&gt; {{ic|/etc/tomcat7}}&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;,&lt;/del&gt; &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;the&lt;/del&gt; &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;most important being&lt;/del&gt; {{ic|server.xml}}&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;.&lt;/del&gt; &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Using these files is out of the scope of this 101 wiki page. Please have a look at the&lt;/del&gt; [http://tomcat.apache.org/tomcat-7.0-doc/index.html&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; official&lt;/del&gt; Tomcat 7 &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;documentation&lt;/del&gt;] &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;for more details.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;基本的な設定はバーチャルホストのウェブアプリケーションで行うことができます&lt;/ins&gt;: http://localhost:8080/host-manager/html &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;。&lt;/ins&gt;{{ic|tomcat-users.xml}} &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;で設定したユーザー名とパスワードを使ってください。他のオプションについては&lt;/ins&gt; {{ic|/etc/tomcat7}} &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;の設定ファイル&lt;/ins&gt; &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;(特に&lt;/ins&gt; {{ic|server.xml}}&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;)&lt;/ins&gt; &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;で変更できます。詳しくは&lt;/ins&gt; [http://tomcat.apache.org/tomcat-7.0-doc/index.html Tomcat 7 &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;の公式ドキュメント&lt;/ins&gt;] &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;を参照。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== 前のバージョンの Tomcat からの移行 ===&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== 前のバージョンの Tomcat からの移行 ===&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;As said in the introduction, &#039;&#039;&#039;&lt;/del&gt;Tomcat 7 &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;does not deprecate&lt;/del&gt; Tomcat 6&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&#039;&#039;&#039;.&lt;/del&gt; &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;They&lt;/del&gt; &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;are&lt;/del&gt; &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;all three, implementations of&lt;/del&gt; Servlet/JSP &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;standards.&lt;/del&gt; &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Hence&lt;/del&gt; &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;you must first determine&lt;/del&gt; [http://tomcat.apache.org/whichversion.html#Apache_Tomcat_Versions &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;which version&lt;/del&gt;] &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;of Tomcat you need depending on the versions of Servlet/JSP your application uses. If you need to migrate, the official website gives&lt;/del&gt; [http://tomcat.apache.org/migration.html &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;instructions&lt;/del&gt; &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;on how to handle such a process].&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;上に書いてあるように、&lt;/ins&gt;Tomcat 7 &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;によって&lt;/ins&gt; Tomcat 6 &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;が使えなくなることはありません。3つとも&lt;/ins&gt; &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Servlet/JSP&lt;/ins&gt; &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;標準の実装です。まず、あなたが使用したいアプリケーションがどのバージョンの&lt;/ins&gt; Servlet/JSP &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;を必要するのかによって&lt;/ins&gt; &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Tomcat&lt;/ins&gt; &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;の&lt;/ins&gt; [http://tomcat.apache.org/whichversion.html#Apache_Tomcat_Versions &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;使用するバージョン&lt;/ins&gt;] &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;を選択する必要があります。バージョンの移行が必要なときは、公式ウェブサイトに&lt;/ins&gt; [http://tomcat.apache.org/migration.html &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;移行を行う手順]&lt;/ins&gt; &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;が書かれています。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== 別の JRE/JDK で Tomcat を使用する ===&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== 別の JRE/JDK で Tomcat を使用する ===&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Kusakata</name></author>
	</entry>
	<entry>
		<id>https://wiki.archlinux.jp/index.php?title=Tomcat&amp;diff=5379&amp;oldid=prev</id>
		<title>Kusakata: ページの作成:「Category:ウェブサーバー de:Apache Tomcat en:Tomcat Tomcat は Apache ソフトウェア財団によって開発されているオープンソースの...」</title>
		<link rel="alternate" type="text/html" href="https://wiki.archlinux.jp/index.php?title=Tomcat&amp;diff=5379&amp;oldid=prev"/>
		<updated>2016-06-16T15:20:56Z</updated>

		<summary type="html">&lt;p&gt;ページの作成:「&lt;a href=&quot;/index.php/%E3%82%AB%E3%83%86%E3%82%B4%E3%83%AA:%E3%82%A6%E3%82%A7%E3%83%96%E3%82%B5%E3%83%BC%E3%83%90%E3%83%BC&quot; title=&quot;カテゴリ:ウェブサーバー&quot;&gt;Category:ウェブサーバー&lt;/a&gt; &lt;a href=&quot;https://wiki.archlinux.de/title/Apache_Tomcat&quot; class=&quot;extiw&quot; title=&quot;de:Apache Tomcat&quot;&gt;de:Apache Tomcat&lt;/a&gt; &lt;a href=&quot;https://wiki.archlinux.org/title/Tomcat&quot; class=&quot;extiw&quot; title=&quot;en:Tomcat&quot;&gt;en:Tomcat&lt;/a&gt; Tomcat は Apache ソフトウェア財団によって開発されているオープンソースの...」&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Category:ウェブサーバー]]&lt;br /&gt;
[[de:Apache Tomcat]]&lt;br /&gt;
[[en:Tomcat]]&lt;br /&gt;
Tomcat は Apache ソフトウェア財団によって開発されているオープンソースの Java [[wikipedia:Java_Servlet#Servlet_containers|Servlet コンテナ]]です。&lt;br /&gt;
&lt;br /&gt;
{{Note|Tomcat には現在3つの安定ブランチが存在します: [http://tomcat.apache.org/download-60.cgi 6], [http://tomcat.apache.org/download-70.cgi 7], [https://tomcat.apache.org/download-80.cgi 8]。新しいバージョンしか動作しないということはなく、[http://tomcat.apache.org/whichversion.html#Apache_Tomcat_Versions 各ブランチはそれぞれ &amp;quot;Servlet&amp;quot; と &amp;quot;JSP&amp;quot; の Java 標準仕様を実装] しています。Arch Linux では全てのバージョンが公式にサポートされています: {{Pkg|tomcat6}}, {{Pkg|tomcat7}}, {{Pkg|tomcat8}}。使用したいウェブアプリケーションの要件にあわせて必要なバージョンは変わります。Tomcat を試してみたいだけであまり時間を割きたくない場合、tomcat7 を試してみると良いでしょう。この wiki ページでは tomcat7 について記述していますが、大体の内容は tomcat6 や tomcat8 でも同じです。}}&lt;br /&gt;
&lt;br /&gt;
== インストール ==&lt;br /&gt;
{{Pkg|tomcat6}}, {{Pkg|tomcat7}}, {{Pkg|tomcat8}} のどれかをインストールしてください。&lt;br /&gt;
&lt;br /&gt;
Tomcat を本番環境にデプロイするときは、{{Pkg|tomcat-native}} をインストールすることも考慮してください。Tomcat のネイティブライブラリは Apache Portable Runtime (APR) ライブラリのネットワーク接続 (ソケット) と RNG 実装を使用するようにサーバーを設定します。ネイティブの32・64ビットのコードを使うことでパフォーマンスが改善されるので、速度が重要な本番環境でしばしば使われています。デフォルトの Tomcat に設定を加える必要はありません。詳しくは [http://tomcat.apache.org/native-doc/ 公式の Tomcat ドキュメント] を参照。&lt;br /&gt;
&lt;br /&gt;
tomcat-native を使用すると {{Ic|catalina.err}} の以下の警告が消えます:&lt;br /&gt;
 INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path [...]&lt;br /&gt;
&lt;br /&gt;
=== ファイルシステム階層 ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! パス名 !! 目的&lt;br /&gt;
|-&lt;br /&gt;
|{{ic|/usr/share/tomcat7}} || スクリプトや他のディレクトリのリンクが存在する Tomcat のメインフォルダ。&lt;br /&gt;
|-&lt;br /&gt;
|{{ic|/usr/share/java/tomcat7}} || Tomcat の Java ライブラリ (jar)。&lt;br /&gt;
|-&lt;br /&gt;
|{{ic|/etc/tomcat7}} || 設定ファイル。例: {{ic|tomcat-users.xml}} (管理ツールを使用するユーザーやロールを定義), {{ic|server.xml}} (Tomcat のメイン設定ファイル), {{ic|catalina.policy}} (セキュリティポリシーの設定ファイル)。&lt;br /&gt;
|-&lt;br /&gt;
||{{ic|/var/log/tomcat7}} || ログファイル。{{Ic|systemd}} からは処理されません ([[#ログ]]を参照)。&lt;br /&gt;
|-&lt;br /&gt;
|{{ic|/var/lib/tomcat7/webapps}} || Tomcat がウェブアプリケーションをデプロイするフォルダ。&lt;br /&gt;
|-&lt;br /&gt;
|{{ic|/var/tmp/tomcat7}} || Tomcat がウェブアプリのデータを保存するフォルダ。&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== 初期設定 ==&lt;br /&gt;
マネージャウェブアプリや管理者ウェブアプリを使用するには次のファイルを編集する必要があります: {{ic|/etc/tomcat7/tomcat-users.xml}}。&lt;br /&gt;
&lt;br /&gt;
XML 宣言の &amp;quot;role and user&amp;quot; をアンコメントして、必要に応じてロール {{Ic|tomcat}}, {{Ic|admin-{gui,script} }}, {{Ic|manager-{gui,script,jmx,status} }} を有効にしてください ([http://tomcat.apache.org/tomcat-7.0-doc/manager-howto.html#Configuring_Manager_Application_Access Configuring Manager Application Access] を参照)。簡単に説明すると、{{Ic|tomcat}} は tomcat を実行するのに必須のロールで、{{Ic|manager-*}} はウェブアプリケーションを管理することができるロール、{{Ic|admin-*}} は Tomcat サーバーに関する全ての権限を持つ管理者です。&lt;br /&gt;
&lt;br /&gt;
上記のロールとユーザー名、パスワードを定義すると以下のようになります ([CHANGE_ME] は適当なパスワードに置き換えてください):&lt;br /&gt;
&lt;br /&gt;
{{hc|/etc/tomcat7/tomcat-users.xml|2=&lt;br /&gt;
&amp;lt;?xml version=&amp;#039;1.0&amp;#039; encoding=&amp;#039;utf-8&amp;#039;?&amp;gt;&lt;br /&gt;
&amp;lt;tomcat-users&amp;gt;&lt;br /&gt;
  &amp;lt;role rolename=&amp;quot;tomcat&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;role rolename=&amp;quot;manager-gui&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;role rolename=&amp;quot;manager-script&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;role rolename=&amp;quot;manager-jmx&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;role rolename=&amp;quot;manager-status&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;role rolename=&amp;quot;admin-gui&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;role rolename=&amp;quot;admin-script&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;user username=&amp;quot;tomcat&amp;quot; password=&amp;quot;&amp;#039;&amp;#039;&amp;#039;[CHANGE_ME]&amp;#039;&amp;#039;&amp;#039;&amp;quot; roles=&amp;quot;tomcat&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;user username=&amp;quot;manager&amp;quot; password=&amp;quot;&amp;#039;&amp;#039;&amp;#039;[CHANGE_ME]&amp;#039;&amp;#039;&amp;#039;&amp;quot; roles=&amp;quot;manager-gui,manager-script,manager-jmx,manager-status&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;user username=&amp;quot;admin&amp;quot; password=&amp;quot;&amp;#039;&amp;#039;&amp;#039;[CHANGE_ME]&amp;#039;&amp;#039;&amp;#039;&amp;quot; roles=&amp;quot;admin-gui&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/tomcat-users&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
上記のファイルに修正を加えたら、都度、Tomcat を再起動する必要があります。&lt;br /&gt;
&lt;br /&gt;
ロールについては [http://blog.techstacks.com/2010/07/new-manager-roles-in-tomcat-7-are-wonderful.html このブロク記事] に詳しい説明があります。&lt;br /&gt;
&lt;br /&gt;
IDE と統合するために設定ファイルの読み込み権限を設定するには、tomcat グループ (使用しているバージョンによって tomcat6, tomcat7, tomcat8 となります) にユーザーを追加してください:&lt;br /&gt;
  gpasswd -a &amp;lt;user&amp;gt; tomcat&amp;lt;number&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tomcat の起動・停止 ==&lt;br /&gt;
&lt;br /&gt;
次のコマンドで Tomcat を起動できます:&lt;br /&gt;
 # systemctl start tomcat7&lt;br /&gt;
&lt;br /&gt;
Tomcat を起動したら、次のページを開いて動作していることを確認します: [http://localhost:8080 http://localhost:8080]。素敵な Tomcat のローカルホームページが表示されたら、Servlet コンテナが問題なく立ち上がっています。起動スクリプトが上手く動作しなかった場合、ブラウザには Java のエラーだけが表示されます。[[Systemd#Journal|systemd の journalctl]] を使って起動ログを確認してください。Tomcat のログに書かれている問題の答えは全て Google にあります。&lt;br /&gt;
&lt;br /&gt;
{{Note|セキュリティを確保するために、Arch Linux の Tomcat パッケージは Apache の [http://commons.apache.org/daemon/ common-daemons] の [http://commons.apache.org/daemon/jsvc.html jsvc] バイナリを使っています。Tomcat の {{Ic|systemd}} サービスは Apache のバイナリを root 権限で実行しますが、Tomcat は非特権ユーザーで起動されます (Arch Linux の場合 {{Ic|tomcat7:tomcat7}})。これによって、悪意のあるウェブアプリケーションによる攻撃コードの実行を防ぐことができます。また、必要な場合、1024番ポートが使われます。{{ic|/etc/conf.d/tomcat7}} に {{Ic|CATALINA_OPTS}} 環境変数で指定することができるオプションについては {{Ic|man jsvc}} を参照してください。}}&lt;br /&gt;
&lt;br /&gt;
=== 手動で操作する方法 ===&lt;br /&gt;
 &lt;br /&gt;
上流のスクリプトを使って Tomcat を直接制御することもできます:&lt;br /&gt;
 /usr/share/tomcat/bin/{startup.sh,shutdown.sh,..}&lt;br /&gt;
アプリケーションや Tomcat をデバッグするときは上記のコマンドが役に立ちますが、一番最初に Tomcat を起動するときには systemd を使ってください。パーミッションが間違って設定されてウェブアプリが実行できなくなる可能性があります。また、上記のスクリプトを使用するには多少の設定が必要になります。上のノートに書かれている jsvc のセキュリティ機構が使えなくなることにも注意してください。&lt;br /&gt;
&lt;br /&gt;
== ウェブアプリケーションのデプロイと管理 ==&lt;br /&gt;
&lt;br /&gt;
Tomcat 7 には5つのウェブアプリケーションがバンドルされています (場合によっては localhost をサーバーの FQDN に変えてください):&lt;br /&gt;
* デフォルトホームページ: [http://localhost:8080/ http://localhost:8080/]&lt;br /&gt;
* Tomcat 7 のローカルドキュメント: [http://localhost:8080/docs/ http://localhost:8080/docs/]&lt;br /&gt;
* Servlets と JSP のサンプル: [http://localhost:8080/examples/ http://localhost:8080/examples/]&lt;br /&gt;
* バーチャルホストを管理するホストマネージャ: [http://localhost:8080/host-manager http://localhost:8080/host-manager/]&lt;br /&gt;
* ウェブアプリケーションを管理するマネージャ: [http://localhost:8080/manager/html http://localhost:8080/manager/html/]&lt;br /&gt;
&lt;br /&gt;
=== GUI を使用する ===&lt;br /&gt;
マネージャウェブアプリ [http://localhost:8080/manager/html http://localhost:8080/manager/html] を使用するのが一番簡単な方法です。{{ic|tomcat-users.xml}} で {{Ic|manager}} に定義したユーザー名・パスワードを使ってください。ログインしたら、既に5つのウェブアプリケーションがデプロイされていることが確認できます。&amp;quot;Deploy&amp;quot; エリアからアプリケーションを追加して &amp;quot;Applications&amp;quot; エリアでアプリケーションを停止・起動・削除します。&lt;br /&gt;
&lt;br /&gt;
=== CLI を使用する ===&lt;br /&gt;
WAR ファイルをアプリケーションディレクトリにコピーする方法もあります: {{ic|/usr/share/tomcat7/webapps}}。その場合、以下のように適切なホストで {{Ic|autoDeploy}} オプションが設定されていることを確認してください:&lt;br /&gt;
{{hc|/etc/tomcat7/server.xml|2=&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;Host name=&amp;quot;localhost&amp;quot;  appBase=&amp;quot;webapps&amp;quot;&lt;br /&gt;
      unpackWARs=&amp;quot;true&amp;quot; &amp;#039;&amp;#039;&amp;#039;autoDeploy=&amp;quot;true&amp;quot;&amp;#039;&amp;#039;&amp;#039;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== webapps フォルダ以外にあるファイルをホスト ===&lt;br /&gt;
If you want to keep your project outside the webapps folder this is possible by creating a {{ic|Context}}. &lt;br /&gt;
Go to {{ic|/etc/tomcat&amp;lt;number&amp;gt;/Catalina/localhost/}} and create your context. A context is a simple xml file which specifies where tomcat should look for the project. The basic format of the file is&lt;br /&gt;
{{hc|/etc/tomcat7/Catalina/localhost/whatShouldFollowLocalhost.xml|2=&lt;br /&gt;
&amp;lt;Context path=&amp;quot;/whatSholdFollwLocalhost&amp;quot; docBase=&amp;quot;/where/your/project/is/&amp;quot; reloadable=&amp;quot;true&amp;quot;/&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
A working example is as follows. This assumes that the project is hosted somewhere in the users /home-folder.&lt;br /&gt;
{{hc|/etc/tomcat7/Catalina/localhost/myProject.xml|2=&lt;br /&gt;
&amp;lt;Context path=&amp;quot;/myProject&amp;quot; docBase=&amp;quot;/home/archie/code/jsp/myProject&amp;quot; reloadable=&amp;quot;true&amp;quot;/&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
The files can now be hosted in {{ic|/home/archie/code/jsp/myProject/}}. To see the project in your webbrowser, go to [http://localhost:8080/myProject http://localhost:8080/myProject].&lt;br /&gt;
If tomcat is unable to load the files, it might be an issue with permissions. {{ic|chmod o+x /home/archie/code/jsp/myProject}} should fix the issue.&lt;br /&gt;
&lt;br /&gt;
== ログ ==&lt;br /&gt;
公式の Arch Linux パッケージの Tomcat は [[Systemd#Journal|systemd の journalctl]] で起動ログを記録します。&amp;#039;{{ic|/var/log/tomcat7/catalina.err}} や {{ic|/var/log/tomcat7/catalina.out}} ファイルは使われません。{{ic|/etc/tomcat7/server.xml}} で {{Ic|Valve}} と定義されている、アクセスログやビジネスログなどのログはデフォルトのまま {{ic|/var/log/tomcat7/}} に記録されます。&lt;br /&gt;
&lt;br /&gt;
上流のようにログを保存したい場合、systemd ファイル {{ic|/lib/systemd/system/tomcat7.service}} を {{ic|/etc/systemd/system/tomcat7.service}} にコピーして、ログファイルの絶対パスを指定する {{ic|SYSLOG}} を変更してください。&lt;br /&gt;
&lt;br /&gt;
== Tips and tricks ==&lt;br /&gt;
Basic configuration can be made through the virtual host manager web application: http://localhost:8080/host-manager/html. Provide the username/password you set in {{ic|tomcat-users.xml}}. Other options are tweaked in configuration files in {{ic|/etc/tomcat7}}, the most important being {{ic|server.xml}}. Using these files is out of the scope of this 101 wiki page. Please have a look at the [http://tomcat.apache.org/tomcat-7.0-doc/index.html official Tomcat 7 documentation] for more details.&lt;br /&gt;
&lt;br /&gt;
=== 前のバージョンの Tomcat からの移行 ===&lt;br /&gt;
As said in the introduction, &amp;#039;&amp;#039;&amp;#039;Tomcat 7 does not deprecate Tomcat 6&amp;#039;&amp;#039;&amp;#039;. They are all three, implementations of Servlet/JSP standards. Hence you must first determine [http://tomcat.apache.org/whichversion.html#Apache_Tomcat_Versions which version] of Tomcat you need depending on the versions of Servlet/JSP your application uses. If you need to migrate, the official website gives [http://tomcat.apache.org/migration.html instructions on how to handle such a process].&lt;br /&gt;
&lt;br /&gt;
=== 別の JRE/JDK で Tomcat を使用する ===&lt;br /&gt;
推奨されている JRE/JDK をインストールしない場合、Tomcat の {{Ic|systemd}} サービスファイルで {{ic|TOMCAT_JAVA_HOME}} 変数を設定してください。&lt;br /&gt;
&lt;br /&gt;
[[Systemd#ユニットファイルの編集]]に書かれているように、カスタム設定で変数を上書きすることができます:&lt;br /&gt;
# {{ic|/etc/systemd/system/tomcat7.service.d}} ディレクトリを作成&lt;br /&gt;
# 作成したディレクトリの中に以下の内容で {{ic|start.conf}} ファイルを保存 (Oracle の JDK パッケージ {{AUR|jdk}} を使用する場合、{{ic|/usr/lib/jvm/java-8-jdk}} としてください):&lt;br /&gt;
 [Service]&lt;br /&gt;
 Environment=TOMCAT_JAVA_HOME=/usr/lib/jvm/java-8-openjdk&lt;br /&gt;
&lt;br /&gt;
もしくは、サービスファイル {{ic|/usr/lib/systemd/system/tomcat7.service}} を {{ic|/etc/systemd/system/}} にコピーして次の行を:&lt;br /&gt;
 Environment=TOMCAT_JAVA_HOME=/usr/lib/jvm/java-7-openjdk&lt;br /&gt;
以下のように置き換えてください (例: Oracle JDK):&lt;br /&gt;
 Environment=TOMCAT_JAVA_HOME=/opt/java&lt;br /&gt;
&lt;br /&gt;
=== セキュリティ設定 ===&lt;br /&gt;
This page gives the bare minimum to get your first web application to run on Tomcat. It is not intended to be the definitive guide to administering Tomcat (it is a job of its own). The official Tomcat website will provide all necessary official matter. One could also refer to [http://oreilly.com/java/archive/tomcat-tips.html this O&amp;#039;Reilly page] and this [http://www.unidata.ucar.edu/projects/THREDDS/tech/reference/TomcatSecurity.html last one]. &lt;br /&gt;
Still, here are some security tips to get you started:&lt;br /&gt;
&lt;br /&gt;
* Keep your Tomcat installation up to date to get the latest fixes to security issues&lt;br /&gt;
* Remove unwanted default applications such as {{Ic|examples}}, {{Ic|docs}}, default home page {{Ic|ROOT}} (&amp;quot;_&amp;quot; in the {{Ic|manager}} webapp). This prevents potential security holes to be exploited. Use the {{Ic|manager}} for that.&lt;br /&gt;
&lt;br /&gt;
For more security you could even remove the host-manager and manager web applications. Keep in mind that the later is useful to deploy web applications.&lt;br /&gt;
&lt;br /&gt;
* Disable the WAR auto-deploy option. This would prevent someone who gained restricted access to the server to copy a WAR into the {{ic|/usr/share/java/webapps}} directory to get it running. Edit {{ic|server.xml}} and set the {{Ic|autoDeploy}} to {{Ic|false}}:&lt;br /&gt;
{{hc|/etc/tomcat7/server.xml|2=&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;Host name=&amp;quot;localhost&amp;quot;  appBase=&amp;quot;webapps&amp;quot;&lt;br /&gt;
      unpackWARs=&amp;quot;true&amp;quot; &amp;#039;&amp;#039;&amp;#039;autoDeploy=&amp;quot;false&amp;quot;&amp;#039;&amp;#039;&amp;#039;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
}}&lt;br /&gt;
* Anonymize Tomcat&amp;#039;s default error page to prevent potential attackers to retrieve Tomcat&amp;#039;s version. To see what Tomcat says by default, just visit an nonexistent page such as [http://localhost:8080/I_dont_exist http://localhost:8080/I_dont_exist]. You get a 404 error page with Tomcat&amp;#039;s version at the bottom.&lt;br /&gt;
&lt;br /&gt;
To anonymize this, edit/open the following JAR (Editors like {{Ic|vim}} can edit zips directly)&lt;br /&gt;
 /usr/share/tomcat7/lib/catalina.jar&lt;br /&gt;
And edit the following file&lt;br /&gt;
{{hc|org/apache/catalina/util/ServerInfo.properties|2=&lt;br /&gt;
...&lt;br /&gt;
server.info=&lt;br /&gt;
server.number=&lt;br /&gt;
server.built=&lt;br /&gt;
...&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
* Disable unused {{Ic|connectors}} in {{ic|server.xml}}&lt;br /&gt;
* Keep restricted access to {{ic|/etc/tomcat7/server.xml}}. Only {{Ic|tomcat}} user and/or {{Ic|root}} should be able to read and write this.&lt;br /&gt;
* Keep {{Ic|jsvc}} usage. Do not use upstream startup scripts unless particular reason as explained in the security note above.&lt;br /&gt;
* Use strong different passwords for each user in {{Ic|tomcat-users.xml}}, give roles to users who really need them and even disable usernames/roles you do not use/need.&lt;br /&gt;
&lt;br /&gt;
One can even crypt {{ic|tomcat-users.xml}} passwords using the following upstream script:&lt;br /&gt;
 /usr/share/tomcat7/bin/digest.sh -a SHA NEW_PASSWORD&lt;br /&gt;
This will output something like:&lt;br /&gt;
 NEW_PASSWORD:b7bbb48a5b7749f1f908eb3c0c021200c72738ce&lt;br /&gt;
Paste the hashed part in place of the clear password in {{ic|tomcat-users.xml}} and add the following to {{ic|server.xml}}:&lt;br /&gt;
{{hc|/etc/tomcat7/server.xml|2=&lt;br /&gt;
&amp;lt;Host&lt;br /&gt;
  ...&lt;br /&gt;
  &amp;lt;Realm&lt;br /&gt;
    ...&lt;br /&gt;
    &amp;#039;&amp;#039;&amp;#039;className=&amp;quot;org.apache.catalina.realm.MemoryRealm&amp;quot; digest=&amp;quot;SHA&amp;quot;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
    ...&lt;br /&gt;
  /&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
/&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Note that this may not be relevant because only root and/or tomcat is supposed to have read/write access to that file. If an intruder manages to gain root access then he would not need such passwords to mess with your applications/data anyway. Be sure to keep restricted RW access to that file!&lt;br /&gt;
* Always know what you are deploying&lt;/div&gt;</summary>
		<author><name>Kusakata</name></author>
	</entry>
</feed>