Well, I just had a nice long response with some questions, then nature called me to my "special thinking spot". And while thinking I figured it out. I processed it. I was looking at it from the wrong angle.
Here is how I was looking at it...
My servlet needed to get some info from the db to the bean. And I was thinking, "what do I need to do first?". I need a DB connection. So, that was what I tried to do. Then I needed my result set. So I built my sql
string and made my db call and got my result set. But just because things are supposed to happen in that order doesn't mean the servlet should be written in a strict top down approach. This is completely wrong.
These are the steps I need to happen.
1.create sql string
2.connect to db
3.get resultset
4.make list of beans by iterating over resultset.
In my servlet I need to call a class called SetBean. That class will make a call to my BuildList method, which calls the ResultSet method, which will make a call to the connection method. By staring at the end result and creating separate classes and methods as I go backwards. This will make my code fall into the MVC pattern. The only thing my servlet is going to do is direct traffic. It will figure out which way I should be moving, pass the appropriate string out to the generic list building methods which will need to only return the list to my servlet so that I can do my request.setAttribute("list",list);
Then forward my getRequestDispatcher to the right jsp.
Whew! I know it took me a while to finally see this. Thank you guys for all your patience and direction. If I'm still missing something please let me know.
Thanks
Bryce Martin