This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma 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

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.

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.


blog -
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Best practice
It's not a secret anymore!