DisplayTag

Database Table

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Cannot Reproduce
  • Affects Version/s: None
  • Fix Version/s: None
  • Labels:
    None
  • Application server:
    Tomcat 5.5.16

Description

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&amp;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 [org.apache.commons.beanutils.BasicDynaBean@1fa6d18, org.apache.commons.beanutils.BasicDynaBean@1049d3, org.apache.commons.beanutils.BasicDynaBean@15ed659, org.apache.commons.beanutils.BasicDynaBean@14a7a12, org.apache.commons.beanutils.BasicDynaBean@9444d1, org.apache.commons.beanutils.BasicDynaBean@32060c, org.apache.commons.beanutils.BasicDynaBean@2b323e, org.apache.commons.beanutils.BasicDynaBean@1efb4be, org.apache.commons.beanutils.BasicDynaBean@435a3a, org.apache.commons.beanutils.BasicDynaBean@1d8c528, org.apache.commons.beanutils.BasicDynaBean@77eaf8, org.apache.commons.beanutils.BasicDynaBean@e35bb7]
 
When i add
 
<display:table name="rows1" />
 
it display nothing found to display.
 
 
Please help what i do?
 
 
BuntyIndia

Activity

Hide
fabrizio giustina added a comment -
please use the user list for this kind of questions
Show
fabrizio giustina added a comment - please use the user list for this kind of questions

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: