Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=3809600
By: buntyindia
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&pass
word=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
______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=249318
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-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/displaytag-user