繁体   English   中英

如何在我的Web项目中阅读web.xml

[英]How to see the web.xml is read in my Web project

我写了一个基本的Hello World我们动态项目,其中安装了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://本地主机:8080 / hello.html的
错误为: HTTP状态404- /hello.html
有什么建议吗?

我会说您需要进入更深的目录。

HTTP://本地主机:8080 /的WebContent / hello.html的

我认为以上一种应该有效:)

通常,此错误是由使用端口8080的其他应用程序引起的,请检查同一端口上是否还有其他程序。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM