idea为tomcat设置虚拟地址

1.设置tomcat的server.xml

<Host name="localhost"  appBase="webapps"
unpackWARs="true" autoDeploy="true"> <!-- SingleSignOn valve, share authentication between web applications
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
--> <!-- Access log processes all example.
Documentation at: /docs/config/valve.html
Note: The pattern used is equivalent to using pattern="common" -->
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log." suffix=".txt"
pattern="%h %l %u %t &quot;%r&quot; %s %b" />
<Context path="/file" docBase="D:\File\file"></Context>
<Context path="/image" docBase="D:\File\image"></Context>
</Host>

增加<Context>的配置

2.但是有可能并不起作用,使用idea启动tomcat并不工作

还需要设置

idea为tomcat设置虚拟地址

运行服务器:

idea为tomcat设置虚拟地址

上一篇:WKWebView浅析


下一篇:iOS 开发之路(WKWebView内嵌HTML5之图片上传) 五