我是一個(gè)struts2的初學(xué)者,按照
max的方法建了一個(gè)struts2的工程,目錄結(jié)構(gòu)如下圖:

在WebContent目錄下建一個(gè)名叫index.html的頁(yè)面,在tomcat中配置虛擬路徑
<Context path="/struts2" docBase="F:\Struts2.0\WebContent" debug="0" crossContext="true" reloadable="true"/>
然后重起tomcat,在瀏覽器中輸入
http://localhost:8080/struts2提示:HTTP Status 404 - /struts2/。
但是,當(dāng)我在tomcat配置虛擬路徑時(shí),這樣配置
<Context path="/struts2" docBase="F:\Struts2.0" debug="0" crossContext="true" reloadable="true"/>
重起tomcat,在瀏覽器中輸入
http://localhost:8080/struts2/WebContent,這時(shí)瀏覽器中就可以顯示出index.html頁(yè)面。
為什么會(huì)出現(xiàn)這種情況呢?
但是我在建其他工程,非struts2的工程的時(shí)候,就不會(huì)出現(xiàn)這種情況,難道是我的tomcat5.5不支持struts2嗎?也不可能啊。
posted on 2007-08-30 19:08
Elven 閱讀(638)
評(píng)論(2) 編輯 收藏