Database Table
--------------
Key: DISPL-372
URL: http://jira.codehaus.org/browse/DISPL-372
Project: DisplayTag
Type: Bug
Components: Tag Library, Paging/Sorting, Export
Reporter: BuntyIndia
Priority: Critical
i want to display the content of my database usin DisplayTag Pagination...m
using NetBeans5.5 with tomcat 5.5.16.
Please Help....
Following is my code....
<jsp:scriptlet>
List rows1= null;
try {
ResultSet rs;
Statement stmt;
Class.forName("com.mysql.jdbc.Driver");
Connection conn =
DriverManager.getConnection("jdbc:mysql://localhost:3306/test?user=root&password=passit");
String sql = "SELECT * FROM gc";
stmt = conn.createStatement();
rs = stmt.executeQuery(sql);
RowSetDynaClass resultSet = new RowSetDynaClass(rs, false);
rows1=resultSet.getRows();
request.setAttribute("rows2",rows1);
String dd = resultSet.getName();
out.println(dd);//printing name
out.println(rows1);//printing content of rows
rs=null;
stmt=null;
} catch(Exception e) {
e.printStackTrace();
}
</jsp:scriptlet>
When i run the above code it displays the following
org.apache.commons.beanutils.RowSetDynaClass [EMAIL PROTECTED], [EMAIL
PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL
PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL
PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]
When i add
<display:table name="rows1" />
it display nothing found to display.
Please help what i do?
BuntyIndia
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
displaytag-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/displaytag-devel