简体   繁体   中英

Http 404 error is getting when static page is deployed

I created a web project using Eclipse. I added one html page index.html inside the WebContent folder. I deployed the project using tomcat 7. When try to run on the server it is giving 404 resource not found error

index.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>Simple Servlet</title>`
</head>
<body>
Hey I am creating simple HTML Page!
</body>
</html>

如果您在eclipse中使用热部署,请右键单击html并说在服务器上运行,选择服务器,eclipse应在eclipse中的Web浏览器上使用正确的URL打开html。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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