jsp分页问题...
继此帖..
http://community.csdn.net/Expert/topic/5386/5386463.xml?temp=.4907495
我把其中的
String sql= "SELECT * FROM bookinfo order by DATET DESC ";
改成:
String sql= "SELECT * FROM bookinfo order by DATET DESC ",ResultSet.TYPE_SCROLL_SENSITIVE,,ResultSet.CONCUR_UPDATABLE;
后,tomcat报错有所改变:
+++++++++++++++++++++++++++
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 28 in the jsp file: /booklist5.jsp
Generated servlet error:
Syntax error on token ". ", , expected
An error occurred at line: 28 in the jsp file: /booklist5.jsp
Generated servlet error:
Syntax error on token(s), misplaced construct(s)
An error occurred at line: 28 in the jsp file: /booklist5.jsp
Generated servlet error:
Syntax error on token ". ", , expected
An error occurred at line: 36 in the jsp file: /booklist5.jsp
Generated servlet error:
Syntax error on tokens, delete these tokens
org.apache.jasper.servlet.JspServletWrapper.handle
JspException(JspServletWrapper.java:510)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
++++++++++++++++++++++++++++++
其中出错的代码如下:
<%-------------------------此地方报错误28行处
DBSQLManager dbsm = new DBSQLManager();
String sql= "SELECT * FROM bookinfo order by DATET DESC ",ResultSet.TYPE_SCROLL_SENSITIVE,,ResultSet.CONCUR_UPDATABLE;
dbsm.setSqlStr(sql);
dbsm.executeQuery();
ResultSet rs=dbsm.getRs();
int i;
%>
<%
//开始纪录页数,如果pg是null那么设置为第一页
------解决方案--------------------Statement stmt = con.createStatement(
ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_UPDATABLE);
我的异常网推荐解决方案:org.apache.jasper.JasperException: Unable to compile class,http://www.aiyiweb.com/j2ee/2308.html