坑啊,爲何網易的博客不能搬過來!!!我一個一個複製過來容易嘛!!!!原文地址:http://buffalo-l.blog.163.com/blog/static/24495402220153911184810/?newFollowBloghtml
第一種:在Server.xml的<Host>標籤中,配置<Context>標籤web
<Context path = "MyWebsite" docBase = "D:\My_Code\example" />
而後重啓tomcat。輸入地址:http://localhost/MyWebsite/瀏覽器
<Context docBase="D:\My_Code\example" />
這些作完後,直接打開http://localhost/abc/***.html便可(由於個人文件名字是index.html因此就沒在瀏覽器中輸入index.html)tomcat