HTTP状态404描述请求的资源()不可用。 Apache Tomcat / 7.0.27 [英] HTTP Status 404 description The requested resource () is not available. Apache Tomcat/7.0.27

查看:4538
本文介绍了HTTP状态404描述请求的资源()不可用。 Apache Tomcat / 7.0.27的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试通过 http:// localhost:7080 / first / 或< a href =http:// localhost:7080 / first / start-page.html =noreferrer> http:// localhost:7080 / first / start-page.html 我收到以下消息:



HTTP状态404 - 类型状态报告消息描述请求的资源()不可用。 Apache Tomcat / 7.0.27



但是如果我要求localhost:7080 / tomcat的主页正确找到。


$ b $有人可以帮助我吗?



为什么我不能从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.0encoding =ISO-8859 -1?> 
<!DOCTYPE html PUBLIC - // W3C // DTD XHTML 1.0 Strict // ENhttp://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-Typecontent =text / html; charset = ISO-8859-1/>
< title>第一页< / title>
< / h:head>
< h:body>
< fieldset>
< legend>随机结果页< / legend>
< h:form>
按按钮可以获得三个可能的结果页面之一。
< br />
< h:commandButton value =转到随机页面
/>
< / h:form>
< / fieldset>
...
< / h:body>< / html>


解决方案

我想你创建了xhtml文件 文件和更改文件扩展名。这是错的您应该创建一个html文件并再次配置扩展名。然后点击下一个按钮。之后,您应该选择新的Facelet模板。然后完成


when i try to access my project home at http://localhost:7080/first/ or http://localhost:7080/first/start-page.html i get this message:

HTTP Status 404 - type Status report message description The requested resource () is not available. Apache Tomcat/7.0.27

but if i ask for localhost:7080/ the home page of tomcat is correctly found.

can someone help me?

why i can't get my start-page.html from eclipes? but when i run from C:\Users\Mohsen\workspace.metadata.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\first\WEB-INF\start-page.html, it runs correctly.

<?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>

解决方案

I think you created "xhtml file", creating a "file" and changing the file extension. This is wrong. You should create a html file and configure again extension. Then click the next button. After that, you should choose "New Facelet Template". Then finish.

这篇关于HTTP状态404描述请求的资源()不可用。 Apache Tomcat / 7.0.27的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆