我的程序是这样的:
<%@ page contentType="test/html;charset=gb2312"%>
<html>
<head>
<title></title>
</head>
<body>
<jsp:include page="H1.html" flush="true"/>
看到内容了吗?
</body>
</html>
而H1.html是一个很简单的页面<html>
<head>
<title>H1.html</title>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my page">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<!--<link rel="stylesheet" type="text/css" href="./styles.css">--> </head>
<body>
This is my HTML page. <br>
</body>
</html>本应该就一个jsp嵌套一个网页输出就完了。可是却显示不了。结果是文件下载。都不知道什么回事,请帮帮忙看下 有人说是因为有<html>在里面。但我试了,还是不行,而且即使在里面有<html>也是可行的。<%@ page language="java" pageEncoding="gb2312"%>
<html>
<head>
<title>My JSP 'products.jsp' starting page</title>
</head>
<body>
this is the page
<jsp:include flush="true" page="includeforward.jsp"></jsp:include><br>
</body>
</html>
includeforward.jsp
<%@ page contentType="text/html;charset=gb2312"%><html>
<head>
<title>My JSP 'H2.jsp' starting page</title>
</head>
<body>
<form method="get" name="f" action="H2_show.jsp"><p> </p><table width="200" border="1">
<tbody><tr>
<td> 总额</td>
<td> <input type="text" name="txttotal"></td></tr>
<tr>
<td> <input type="submit" name="button3"></td>
<td> <input type="reset" name="button4"></td></tr>
</tbody></table><p> </p><p> </p><p> </p><p> </p><p> </p></form> </body>
</html>迷惑中。。
<%@ page contentType="test/html;charset=gb2312"%>
<html>
<head>
<title></title>
</head>
<body>
<jsp:include page="H1.html" flush="true"/>
看到内容了吗?
</body>
</html>
而H1.html是一个很简单的页面<html>
<head>
<title>H1.html</title>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my page">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<!--<link rel="stylesheet" type="text/css" href="./styles.css">--> </head>
<body>
This is my HTML page. <br>
</body>
</html>本应该就一个jsp嵌套一个网页输出就完了。可是却显示不了。结果是文件下载。都不知道什么回事,请帮帮忙看下 有人说是因为有<html>在里面。但我试了,还是不行,而且即使在里面有<html>也是可行的。<%@ page language="java" pageEncoding="gb2312"%>
<html>
<head>
<title>My JSP 'products.jsp' starting page</title>
</head>
<body>
this is the page
<jsp:include flush="true" page="includeforward.jsp"></jsp:include><br>
</body>
</html>
includeforward.jsp
<%@ page contentType="text/html;charset=gb2312"%><html>
<head>
<title>My JSP 'H2.jsp' starting page</title>
</head>
<body>
<form method="get" name="f" action="H2_show.jsp"><p> </p><table width="200" border="1">
<tbody><tr>
<td> 总额</td>
<td> <input type="text" name="txttotal"></td></tr>
<tr>
<td> <input type="submit" name="button3"></td>
<td> <input type="reset" name="button4"></td></tr>
</tbody></table><p> </p><p> </p><p> </p><p> </p><p> </p></form> </body>
</html>迷惑中。。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货