web服務,如何在URL裡去掉專案名稱
<Context docBase="/usr/local/tomcat/apache-tomcat-7.0.77/webapps/HelloSpringMVC"
path=""
reloadable="true"/>web伺服器:Tomcat
修改server.xml
在該web服務所在的host下新增<Context docBase........."true"/>部分配置。
<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 "%r" %s %b" />
<Context docBase="/usr/local/tomcat/apache-tomcat-7.0.77/webapps/HelloSpringMVC"
path=""
reloadable="true"/>
</Host>