我对 servlet 很熟悉。
我想在jsp的帮助下做一个项目。我在 eclipse 上创建了一个名为 website 的 Web 项目,然后我复制了一些命令,例如 jsp:include
。起初它运行正确显示所有上下文,但之后它只是给出如下错误:
找不到 Http 页面
我不知道我做错了什么。此外,我没有在 web.xml
文件中进行更改。我不知道该文件是否需要任何更改。
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Yo</title>
<jsp:include page="Header.html"/>
</head>
<body>
<!--<div id="header" style="background-color:orange;width:1360px;height:120px">
<h1><style="margin-bottom:0;"><font size="72px" color="white" ><center>
UTTAR PRADESH TECHNICAL UNIVERSITY
</center></font></h1>
</div>-->
WebSite under contruction.
<table width="100%" border="0" cellspacing="0" cellpadding="0" >
<tr>
<td width="15%"> <jsp:include page="LeftPanel.html" flush="true"/>Left Panel </td>
<td width="70%" class="alignment">
<table width="100%" border="0" cellspacing="0" cellpadding="0" >
<tr><td><jsp:include page="Header.html" flush="true"/></td>
</tr>
</table>
</td>
<!--<td width="15%"> <jsp:include page="RightPanel.html" flush="true"/>Right Panel</td>-->
</tr>
</table>
</body>
这是我制作的版本,但它无法正常工作,甚至像下面这样的简单代码也无法正确部署。
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Watch Initial D live Online Free</title>
<jsp:include page="Header.html"/>
</head>
<body>
Hey Whats Up just Testing..
</body>
</html>
最佳答案
我找到了它发生冲突并停止响应的原因。 它在 8080 端口与 oracle 10g 服务器冲突 所以我将端口切换到 80 of my apache tomcat server 。 现在它可以正常工作了。
关于html - Eclipse、基本 JSP 和 Apache Tomcat,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17214322/