小编iMy*_*sak的帖子

HTTP状态404说明请求的资源()不可用.Apache Tomcat/7.0.27

当我尝试在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)

eclipse tomcat7

5
推荐指数
1
解决办法
3万
查看次数

在注释中使用变量/表达式(在 Thymeleaf 模板中)

我需要在页面中添加一些有关生成的信息。

\n\n
</html>\n<!-- page [[${pageCode}]] was generated at [[${#dates.format(currentDate, \xe2\x80\x98dd/MMM/yyyy HH:mm\xe2\x80\x99)}]]  -->\n
Run Code Online (Sandbox Code Playgroud)\n\n

但对我来说这不起作用。\n我应该配置一些东西还是以其他方式进行?

\n

java thymeleaf

4
推荐指数
1
解决办法
5863
查看次数

标签 统计

eclipse ×1

java ×1

thymeleaf ×1

tomcat7 ×1