當我嘗試在http://localhost:7080/first/或http://localhost:7080/first/start-page.html我得到這個消息來訪問我的項目主頁:HTTP狀態404說明請求的資源()不可用。的Apache Tomcat/7.0.27
HTTP狀態404 - 類型狀態報告消息的描述所請求的資源()不可用。 Apache Tomcat/7.0.27
但如果我要求本地主機:7080/tomcat的主頁是正確找到。
有人可以幫我嗎?
爲什麼我無法從eclipes獲取我的start-page.html? 但是當我從C:\ Users \ Mohsen \ workspace.metadata.plugins \ org.eclipse.wst.server.core \ tmp0 \ wtpwebapps \ first \ WEB-INF \ start-page.html運行時,它運行正常。
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html">
<h:head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>first page</title>
</h:head>
<h:body>
<fieldset>
<legend>Random Results Page</legend>
<h:form>
Press button to get one of three possible results pages.
<br/>
<h:commandButton value="Go to Random Page"
/>
</h:form>
</fieldset>
…
</h:body></html>
如果有一些錯誤,你可以從日誌[tomcat_dir] /logs/catalina.out提供錯誤嗎? – iMysak 2012-04-18 10:02:49
@iMysak我沒有錯誤。 – Mohsen 2012-04-18 10:05:17
它看起來像Tomcat安裝正確,但你還沒有部署你的應用程序。你是如何部署它的? – ziggy 2012-04-18 10:05:26