一般網上的解決方案是
server.xml 加入: <Context path="/XX/XXXX" docBase="實際應用程序目錄"></Context>
其實,只要tomcat webapps目錄下實際應用目錄改爲XX#XXXX即可。