【发布时间】:2012-04-26 15:06:01
【问题描述】:
我是 Java 初学者。我正在使用 eclipse Helios 和 Tomcat 7。
我配置了服务器并编写了我的第一个 JSF 页面,但出现了这个错误:
HTTP Status 404 - /
type Status report
message /
description The requested resource (/) is not available.
Apache Tomcat/7.0.27
第一页的代码是这样的:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html">
<h:head>
<title>JSF 2.0 Hello World</title>
</h:head>
<h:body>
<h3>JSF 2.0 Hello World Example - hello.xhtml</h3>
</h:body>
</html>
然后我将端口更改为 8088。但是当我在浏览器中输入 localhost:8088 时,我得到了同样的错误。
【问题讨论】:
-
你的配置文件(web.xml,faces-config)等你使用的是maven还是eclipse?还有什么罐子在你的战争中?
-
@LightGuard 我正在使用 Eclipse。我使用 jsf 2.0 (Mojarra 2.0.3 FCS)
标签: eclipse jakarta-ee tomcat jsf-2