在 tomcat6的安装路径下,D:\Tomcat-6\conf,修改server.xml文件
编辑Host节点,
<Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true" xmlNamespaceAware="false" xmlValidation="false">
<Context docBase="D:\web\javaproject" path="" reloadable="true" crossContext="true"/>
</Host>
这样就可以用 http://localhost:8080 访问了。
如果需要http://localhost:8080/javaproject 访问, 那么就需要把 工程放在webapps
目录下面。
这样可以用2种方式访问, 上述配置, 只能用 http://localhost:8080 访问.