1、 Configuration
By default, the first two are not checked and should be checked:
In the cotext node, there is a reloadable: 'true' attribute. Changing it to false can take effect without restarting the server after modifying the java file. However, it does not include creating new java files, adding methods and variables
2、 Browse files
The file generated separately by context node:
The original Tomcat installation directory is conf/ server.xml After checking the second option, server.xml This node does not exist in:
<Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true">
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" pattern="%h %l %u %t "%r" %s %b" prefix="localhost_access_log" suffix=".txt"/>
<Context docBase="D:\workspace\workspace(eclipse)\Shop\WebContent" path="/Shop" reloadable="true" source="org.eclipse.jst.jee.server:Shop">
<Resources>
<PreResources base="D:\workspace\workspace(eclipse)\Shop\build\classes" classLoaderOnly="false" className="org.apache.catalina.webresources.DirResourceSet" internalPath="/" webAppMount="/WEB-INF/classes"/>
</Resources>
</Context>
</Host>
3、 Why
1. Check the first one to prevent a warning:
Warning: a docbase D / Tomcat / webapps / shop inside the host appbase has been specified, and will be ignored
If checked, it means that Tomcat can directly use the things under the webcontent in eclipse
Omit publish to < workspace > metadata.pluginsorg.eclipse . wst.server.coretmp0webapps
And delete the relevant resources under tmp0webapps,
At the same time, the < workspace > will be modified metadata.pluginsorg.eclipse . wst.server.coreservers Servemoduleswithoutpublish = true and tmp0 / conf in. XML/ server.xml < context > configuration in
2. Check the second one to prevent a warning:
Warning: [setpropertiesrule] {server / service / engine / host / context} setting property ‘source’ to ‘ org.eclipse.jst .j2 ee.server :strut2demo’ did not find a matching property.
[setpropertiesrule] warning reason is Tomcat 6.0 or above server.xml The source attribute is no longer supported in the context node of. The details are as follows:
For Tomcat 6, unlike Tomcat 4.x, it is NOT recommended to place <Context> elements directly in the server.xml file. This is because it makes modifying the Context configuration more invasive since the main conf/server.xml file cannot be reloaded without restarting Tomcat.