EclipseがWebアプリケーションを展開する場所 - Tomcat

EclipseがWebアプリケーションをデプロイする場所– Tomcat

デフォルトでは、EclipseはWebアプリケーションをwtpwebappsという内部プラグインフォルダーにデプロイします。このフォルダーは次のディレクトリにあります。

{Your_Workspace}/.metadata/.plugins/org.eclipse.wst.server.core/tmp{number}/wtpwebapps

#Example 1 - Windows
C:\Users\example\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps

#Example 2 - Mac OSX
/Users/example/Documents/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps

使い方

サーバービューで、「Tomcatサーバー」をダブルクリックすると、展開作業はServer Locationsで定義されます。

eclipse-tomcat-deploy-web-application-1

デフォルトの動作を編集するには、Open Launch Configurationをクリックし、Argumentsタブを選択します。デプロイパスは、VM引数で定義されます。

eclipse-tomcat-deploy-web-application-2

VM引数:

-Dcatalina.base="/Users/example/Documents/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp1"
-Dcatalina.home="/Users/example/Downloads/apache-tomcat-7.0.29"
-Dwtp.deploy="/Users/example/Documents/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps"
-Djava.endorsed.dirs="/Users/example/Downloads/apache-tomcat-7.0.29/endorsed"