2017年3月30日星期四

tomcat load application twice

突然出现这个问题,浪费了不少时间,目前用的是
用的是Eclipse 4.2 Juno tomcat7。
下面的设置会导致load两次
导致两次load的条件‘
 Host的appBase如果是wtpwebapps,并且context的path名字不是project的名字。

避免的方法是appBase指定为webapps就可以了。deploy的路径是wtpwebapps。

自然,这也是wtp的bug
https://bugs.eclipse.org/bugs/show_bug.cgi?id=125364

This is being address by work for Bug 145834. The location where modules are deployed now defaults to "wtpwebapps" instead of "webapps" for new servers. This setting can be modified in the server editor.  By publishing modules to a directory other than "webapps", autoDeploy being enabled can cause the second copy to be served.

If this is an issue for an existing server, changing the server's deploy path in the server editor will be necessary.  There is a link in the server editor that can be clicked to set the new default deploy path.  Note that the server must be published (i.e. synchronized) with no modules present before this setting can be changed.

Since this is the extent to which this issue will be addressed, I'm marking it FIXED.