Hii, I am a beginner in struts..I want to retrieve few records from database and display in jsp page.First i tried assuming only one record is returned by the query.. Below is what i wrote in action. Statement stmt=con.createStatement(); ResultSet rs=stmt.executeQuery(query); if(rs.next()) { searchForm.setFlightno(rs.getString(1)); searchForm.setSource(rs.getString(2)); searchForm.setDestination(rs.getString(3)); searchForm.setDay(rs.getString(4)); searchForm.setDeptime(rs.getString(5)); searchForm.setArrtime(rs.getString(6)); searchForm.setNoofseats(rs.getString(7)); searchForm.setDate(date); } I populate the properties of bean so that i can print them in jsp.. Search Results <bean:write name="searchForm" property="flightno"/><br> <bean:write name="searchForm" property="source"/><br/> <bean:write name="searchForm" property="destination"/><br> <bean:write name="searchForm" property="day"/><br> <bean:write name="searchForm" property="deptime"/><br> <bean:write name="searchForm" property="arrtime"/><br> <bean:write name="searchForm" property="noofseats"/><br> <bean:write name="searchForm" property="date"/><br>
But the problem is I am not getting how to deal with multiple records. Of course we store them in array but is that the correct method? How such multiple instances form properties can be used and how can i print them in jsp? Ya there is logic iterator and all but where and how should i put the db query result. I know its a basic thing to be known but just not getting any idea.. Please help me......... -- View this message in context: http://www.nabble.com/Struts-basic-display-search-results-in-jsp-tp15631512p15631512.html Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]