• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

DAO layer in struts-2

 
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

In struts-2, how to use DAO layer which communicates with DB. I don't know if DAO layer comes, then what is the function of Model. Now, in my application, I've bean with setters and getters, Model which is responsible for communicating with DB and retrieving DB. Action classes which validates client side input. Can anybody give me a proper structure of struts-2 with DAO layer?

Thanks:
Ramakrishna K.C
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The major components of Struts 2 do not exactly map to the MVC pattern. This article has a typical MVC overlay of Struts. As far as Struts is concerned, the controller is the dispatcher and interceptors. For a non-trivial Struts application, I would maintain there will be a fair amount of controller logic in the Action and the Model is usually pushed into a JavaBean. The Action then uses the DAO to obtain the appropriate Model instance for what the View has requested..
 
A wop bop a lu bop a womp bam boom! Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic