I'm curious on opions on the fastest/best way to retrieve information
from a database using java/jsp.

For example say you have various people in a database and have
their name, phone number, address, etc. stored in there.
Where I work we don't do the database select statements in the
jsp pages but in seperate classes out on the server but obviously
call them from the jsp pages.

 I seem to think it's convenient then to create a vector of , for
example, "people" objects and then iterate through the vector
getting the information I need from each object..getPhoneNumber,
getAddress, etc. Is this a good way to get this information from a
database?

 I'm also curious if it's worth an extra step of accessing the
database first in order to get a row count that you could then use to
give the vector a size? (will this even be worth it for a small
database that maybe only has only 1000 rows?)
Another method I've used is setting up an array of hashtables and
then calling up each hash table and getting phone number,
address, etc. that way. Is this better?

Thanks so much for any feedback. It would be greatly appreciated.
Please feel free to reply to [EMAIL PROTECTED]
Rick

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to