效果圖
![這裏寫圖片描述](http://static.javashuo.com/static/loading.gif)
打開 tomcat - ->conf- ->server.xml 編輯>
![這裏寫圖片描述](http://static.javashuo.com/static/loading.gif)
改爲以下代碼
<Connector port="80" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" URIEncoding="utf-8" />
![這裏寫圖片描述](http://static.javashuo.com/static/loading.gif)
2. 修改 Engine - - - defaultHost 改爲你的域名
<Engine name="Catalina" defaultHost="www.omghz.cn">//默認是localhost
3. 修改 Host – - name =你的域名 再添加Context(以下)
<Host name="www.omghz.cn" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Context path="" docBase ="/ItcastOA/"/>//這個就是你要映射的項目名稱
</Host>
![這裏寫圖片描述](http://static.javashuo.com/static/loading.gif)
保存 啓動Tomcat
![這裏寫圖片描述](http://static.javashuo.com/static/loading.gif)