<%@ page language="java" import="java.util.*" contentType="text/html;charset=gb2312"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  <base href="<%=basePath%>">
    
    <title>王老笨图书在线</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">    
<meta http-equiv="keywords" content="图书 出版社新书 特价图书 图书装备">
<meta http-equiv="description" content="书店 在线图书 学校图书 图书馆装备 王老笨图书在线">

<link rel="stylesheet" type="text/css" href="style.css">  </head>  
  
  <body>  
 <frameset rows="20%,80%">
<frame src="head.jsp" />
<frameset cols="25%,75%">
<frame src="left.jsp"/>
<frame src="main.jsp"/>
</frameset>
</frameset>
  <!--页面头部-->
 <%--  <%@include file="head.jsp"%>
  <!--页面左部-->
<%@include file="left.jsp"%>
  <!--页面中部-->
<%@include file="main.jsp"%>
  <!--页面底部-->
<%@include file="foot.jsp"%>--%>
</body>
</html>
 以上是代码,运行后是以下的错误信息
<%@ page language="java" import="java.util.*" contentType="text/html;charset=gb2312"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  <base href="<%=basePath%>">
    
    <title>王老笨图书在线</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">    
<meta http-equiv="keywords" content="图书 出版社新书 特价图书 图书装备">
<meta http-equiv="description" content="书店 在线图书 学校图书 图书馆装备 王老笨图书在线">

<link rel="stylesheet" type="text/css" href="style.css">  </head>  
  
  <body>  
 <frameset rows="20%,80%">
<frame src="head.jsp" />
<frameset cols="25%,75%">
<frame src="left.jsp"/>
<frame src="main.jsp"/>
</frameset>
</frameset>
  <!--页面头部-->
 <%--  <%@include file="head.jsp"%>
  <!--页面左部-->
<%@include file="left.jsp"%>
  <!--页面中部-->
<%@include file="main.jsp"%>
  <!--页面底部-->
<%@include file="foot.jsp"%>--%>
</body>
</html>

解决方案 »

  1.   

    <%@ page language="java" import="java.util.*" contentType="text/html;charset=gb2312"%>
    <%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
    %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
      <head>
      <base href="<%=basePath%>">
        
      <title>王老笨图书在线</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">   
    <meta http-equiv="keywords" content="图书 出版社新书 特价图书 图书装备">
    <meta http-equiv="description" content="书店 在线图书 学校图书 图书馆装备 王老笨图书在线"><link rel="stylesheet" type="text/css" href="style.css">  </head> 
    <frameset rows="20%,80%">
    <frame src="head.jsp" />
    <frameset cols="25%,75%">
    <frame src="left.jsp"/>
    <frame src="main.jsp"/>
    </frameset>
    </frameset>
    <noframes><body>
    很抱歉,阁下使用的浏览器不支援框架功能,请转用新的浏览器
    </body></noframes>
    </html>
      

  2.   

    把body标签去掉就没事啦,framset标签能有body标签的存在的
      

  3.   

    你和我是一个毛病,就是<frameset>这个玩意要放在</head>后面  <body>前面  ……   是不是悟了