Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Best practice

 
Anand Gondhiya
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 995
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
LOL. I think it is not a good solution... it's the only good solution.

./pope
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic