回 帖 发 新 帖 刷新版面

主题:include 命令包含文件不能显示

menu.jspf文件如下:
<%@ page pageEncoding="GB2312" %>
<table align="center">
    <tr>
    <th><a herf="index.jsp>[首页]</a></th>
    <th><a herf="introduce.jsp">[自我介绍]</a></th>
    <th><a herf="album.jsp">[我的相册]</a></th>
</tr>
</table>

include.jsp文件如下:
<%@ contentType="text/html;charset=GB2312 %>
<html>
<head><title>引入其它文件</title></head>
<body>
<h2 align="center">网络咖啡屋</h2>
<%@ include file="menu.jspf" %>
</body>
</html>

回复列表 (共2个回复)

沙发

包含的文件里面不要有<html><head><body>这些标签!

板凳

不是没有么???
我用随书带的源代码又可以显示.

我来回复

您尚未登录,请登录后再回复。点此登录或注册