History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: DISPL-372
Type: Bug Bug
Status: Closed Closed
Resolution: Cannot Reproduce
Priority: Critical Critical
Reporter: BuntyIndia
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
DisplayTag

Database Table

Created: 06/Jul/06 04:33 AM   Updated: 14/Aug/07 04:41 PM
Component/s: Tag Library, Export, Paging/Sorting
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

Application server: Tomcat 5.5.16


 Description  « Hide
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

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
fabrizio giustina - 14/Aug/07 04:41 PM
please use the user list for this kind of questions