org.apache.jasper.JasperException: Cannot find any information on property 'qpag
各位大神帮帮忙,我采用useBean时出现错误
org.apache.jasper.
JasperException: Cannot find any information on property 'qpageallcount' in a bean of type 'done.showrecordbypage'
package done;
import java.sql.*;
import com.sun.rowset.*;
public class showrecordbypage
{
int pagesize=10;
int qpageallcount=0;
int showpage=1;
StringBuffer presentpageresult;
CachedRowSetImpl rowset;
String databasename="";
String tablename="";
String user="";
String password="";
String 字段[]=new String[100];
int 字段个数=0;
public showrecordbypage()
{
presentpageresult=new StringBuffer();
try{
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver").newInstance();
}
catch(Exception e){}
}
public void setpagesize(int size)
{
pagesize=size;
字段个数=0;
String uri="jdbc:sqlserver://127.0.0.1:1433;DatabaseName="+databasename;
try{
Connection con=DriverManager.getConnection(uri,user,password);
DatabaseMetaData metadata=con.getMetaData();
ResultSet rsl=metadata.getColumns(null, null, tablename, null);
int k=0;
while(rsl.next()){
字段个数++;
字段[k]=rsl.getString(1);//获得字段的名字
k++;
}
Statement sql=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY);
ResultSet rs=sql.executeQuery("select* from"+tablename);
rowset=new CachedRowSetImpl();//创建行集对象
rowset.populate(rs);
con.close();
rowset.last();//关闭连接
int m=rowset.getRow();//总行数
int n =pagesize;
qpageallcount=((m%n)==0)?(m/n):(m/n+1);
}
catch(Exception exp){}
}
public int getpagesize()
{
return pagesize;
}
public int getpageAllCount()
{
return qpageallcount;
}
public void setshowpage(int n)
{
showpage=n;
}
public int getshowpage()
{
return showpage;
}
public StringBuffer getPresentPageResult()
{
if(showpage>qpageallcount)
showpage=1;
if(showpage<=0)
showpage=qpageallcount;
presentpageresult=show(showpage);
return presentpageresult;
}
public StringBuffer show(int page)
{
StringBuffer str=new StringBuffer();
str.append("<table border=1>");
str.append("<tr>");
for(int i=0;i<字段个数;i++)
{
str.append("<th>"+字段[i]+"</th>");
}
str.append("</tr>");
try{rowset.absolute((page-1)*pagesize+1);
for(int i=1;i<pagesize;i++){
str.append("<tr>");
for(int k=1;k<字段个数;k++){
str.append("<td>"+rowset.getString(k)+"</td>");
}
str.append("</tr>");
}
}
catch(
SQLException exp){}
str.append("</table>");
return str;
}
public void setDatabaseName(String s)
{
databasename=s.trim();
}
public String getDatabaseName()
{
return databasename;
}
public void setTableName(String s)
{<