Hi,
The usual pattern is like servlets will recieve the request from user interface and pass the recieved data to a DAO [Data Access Objects], which will interact with database and retrieve or update data. if you are retrieving data from the database this data will be stored in a java object which is ofcourse user defined, [for your case a java class with all the book details] this custom object will be returned to servlet and servlet can set this object in to request as attribute or in to session and pass the control to other servlet or jsp.
Hope its clear to you.
Regards,
Rakesh :)
|