当我尝试在http:// localhost:7080/first /或http:// localhost:7080/first/start-page.html访问我的项目主页时,我收到此消息:
HTTP状态404 - 类型状态报告消息说明请求的资源()不可用.Apache Tomcat/7.0.27
但如果我要求localhost: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>
Run Code Online (Sandbox Code Playgroud)
请查看“服务器”选项卡,如图所示:

如果您在服务器中没有看到您的项目,您需要先“发布”您的项目。// 右键单击服务器 -> “添加和删除” -> 将项目从“可用”添加到“已配置” -> 单击“完成” 我希望这会有所帮助。
| 归档时间: |
|
| 查看次数: |
26963 次 |
| 最近记录: |