This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes OO, Patterns, UML and Refactoring and the fly likes Best practice Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Best practice" Watch "Best practice" New topic
Author

Best practice

Anand Gondhiya
Ranch Hand

Joined: Feb 24, 2004
Posts: 155
Hi All,

I use struts 1.1 , Weblogic on Win2000.

I have a dropdown menu on my JSP page. data in this dropdown menu is supposed to come from Database.

I am familiar with design patterns like DAO,VO(DTO),Singleton etc..

Could anybody tell me what's the best practice to populate this dropdown menu from the data which came from Database.

Thanks
-Anand.
Anand Gondhiya
Ranch Hand

Joined: Feb 24, 2004
Posts: 155
How about putting the DAOs inside the ActionServlet and thus getting dropdown data in ActionServlet only. Once we have data(Collection) , we can put that in to the scope (request or session) and then use it in View ( JSP)
is this a good solution ?
Alexandru Popescu
Ranch Hand

Joined: Jul 12, 2004
Posts: 995
LOL. I think it is not a good solution... it's the only good solution.

./pope


blog - InfoQ.com
 
 
subject: Best practice