Shaolin
09-04-2008, 03:15 PM
Problem fixed. can a mod delete this thread.
|
Click to See Complete Forum and Search --> : Xml not outputting data properly Shaolin 09-04-2008, 03:15 PM Problem fixed. can a mod delete this thread. chazzy 09-04-2008, 04:09 PM Your error checking's not returning any failures. At a basic, you can change this block of code try { while (rs.next()) { userId = rs.getString("user_id"); fname = rs.getString("first_name"); lname = rs.getString("last_name"); address = rs.getString("add1"); Contacts contact = new Contacts(); //Create Class object contact.setDetails(userId,fname,lname,address); //Set details into object contacts.add(contact); //Place object into list } rs.close(); } catch(SQLException ex) {ex.toString();} to try { while (rs.next()) { userId = rs.getString("user_id"); fname = rs.getString("first_name"); lname = rs.getString("last_name"); address = rs.getString("add1"); Contacts contact = new Contacts(); //Create Class object contact.setDetails(userId,fname,lname,address); //Set details into object contacts.add(contact); //Place object into list } rs.close(); } catch(SQLException ex) { System.err.println("**** sql exception begin ****"); ex.printStackTrace(System.err); } Then take a look at wherever your system.err is pointing to. Shaolin 09-04-2008, 10:40 PM Thanks chazzy. I am in need of some more advice if you dont mind. Since my app is being developed with ajax, building pages using dom is way too long, so instead I have a servlet request which basically spits out the required html and then I use innerHTML to insert to content into to page. With dynamic content I use XML/DOM to build the tables/divs and then insert them into the html. The servlet processes both the html/xml GET requests. Now, does this sound like a good way of doing things ? webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved. |