很简单, 随手记下: conf目录下的server.xml, 在对应的里面增加一行:
<Context docBase="/home/tomcat/archives/adserver" path="/static" reloadable="false"/>
就像这样
<Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true"> <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="localhost_access_log." suffix=".txt" pattern="%h %l %u %t "%r" %s %b" /> <Context docBase="/home/tomcat/archives/adserver" path="/static" reloadable="false"/> </Host>
而增加一个外部目录作为tomcat项目目录, 可以参考eclipse的做法:
<Context docBase="D:workJavaworkspacewtpwebappsarya" path="/arya" reloadable="false" source="org.eclipse.jst.jee.server:arya"/>