<%@ page language="java" import="java.util.*" pageEncoding="gbk"%>
<jsp:useBean id="pageCtl" class="com.PageBean" scope="request"/>
<%
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>My JSP 'contact.jsp' starting page</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="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->  </head>
  
  <body>
    <table border=1>
<% Vector v=pageCtl.getResult();
  Enumeration  e=v.elements();
  
 while(e.hasMoreElements())
{
 Object[] obj=(Object[])e.nextElement(); 
%>
 <tr>  
<td   align="center" width="95"><%= obj[0] %></td>
<td  align="center"  width="93"><%= obj[1]%></td>
<td  align="center"  width="71"><%=  obj[2] %></td>
<td  align="center"  width="142"><%= obj[3] %></td>
<td  align="center"  width="142"><%= obj[4] %></td>
<td  align="center"  width="142"><%= obj[5] %></td>
</tr>
<% }%>
</table>
<%if(pageCtl.maxPage!=1){%>
<form name="PageForm"  action="main" method="post">
<%@ include file="pageman.jsp"%> 这里提示错误
</form>
<%}%>
    
  </body>
</html>
pageman.jsp的路径在WebRoot下

解决方案 »

  1.   

    <jsp:include   page="XX.jsp"  /> 试试
      

  2.   

    看看是不是pageman.jsp中声明了与当前页同名的变量
      

  3.   


    <%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
    %> 这些删掉.
      

  4.   

    <%@ include file="pageman.jsp"%>,这种方式的引用,相当于直接把pageman.jsp的内容直接粘贴到引用页当中,如果2个页面中有同名的变量,contentType指定不一致等情况,都会报错
      

  5.   

    <jsp:include page="/pageman.jsp"/>