• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to access mutliple records

 
ravi krishna muthireddy
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
accessing multiple records from table using beans
i.e using mvc architecture results should be displayed using jsp's

servlet--bean(bussines logic accesing tables and retirving them passin to servlet again)
from servlet it goes to jsp i am not able to get all records only last record is being retrived
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65529
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Then there is obviously some problem with your logic somewhere along the way. More than that cannot be said with the information that you have provided.

The logic should go something like this: the model class obtains the resultset from the database and stores the records in a List or other collection object to pass back to the controller. The result set is released. The controller passes the collection to the JSP as a scoped variable. The JSP iterates over the collection, preferably in a scriptless fashion using the JSTL and EL in order to produce the output.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!