【发布时间】:2017-02-08 12:22:42
【问题描述】:
我编写了一个基本的 Hello World we 动态项目,并安装了 apache 服务器。
Web.xml 内容是,
<display-name>hello</display-name>
<welcome-file-list>
<welcome-file>hello.html</welcome-file>
</welcome-file-list>
hello.html 是,
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
Hello World!!
</body>
</html>
启动我的 apache 后,我正在尝试访问 URL,
http://localhost:8080/hello.html
得到错误:HTTP Status 404 - /hello.html
有什么建议吗?
【问题讨论】:
-
你的项目目录下没有hello.xml。正确的 URL 应该是 localhost:8080/hello.html
标签: java html web-services tomcat dynamic