conf/sever.xml <?xml version="1.0" encoding="UTF-8"?> <!--This comment s this file as generated, so it may be deleted and regenerated at any time. To preserve manual changes to this file, delete this comment.--> <Server debug="0" port="8081" shutdown="SHUTDOWN"> <Service name="Tomcat-Standalone"> <Connector acceptCount="10" className="org.apache.coyote.tomcat4.CoyoteConnector" connectionTimeout="60000" debug="0" maxProcessors="75" minProcessors="5" port="8080" useURIValidationHack="false"/> <Engine debug="0" defaultHost="localhost" name="Standalone"> <Host appBase="C:\JSP" debug="0" name="localhost" unpackWARs="true"/> </Engine> </Service> </Server>
WAR or Directory URL是由应用的Context Path决定的;
另外一个XML Configuration file URL,楼主说的是什么?
<?xml version="1.0" encoding="UTF-8"?>
<!--This comment s this file as generated, so it may be deleted and regenerated at any time. To preserve manual changes to this file, delete this comment.-->
<Server debug="0" port="8081" shutdown="SHUTDOWN">
<Service name="Tomcat-Standalone">
<Connector acceptCount="10" className="org.apache.coyote.tomcat4.CoyoteConnector" connectionTimeout="60000" debug="0" maxProcessors="75" minProcessors="5" port="8080" useURIValidationHack="false"/>
<Engine debug="0" defaultHost="localhost" name="Standalone">
<Host appBase="C:\JSP" debug="0" name="localhost" unpackWARs="true"/>
</Engine>
</Service>
</Server>
下新建一个文件:jsp.xml
内容为
<Context docBase="D:\JSP" />