Relationship DAO, Servlet, JSP and POJO
- by John Hendrik
I want to implement a JSP, POJO, DAO and Servlet in my J2EE program. However, I don't fully understand how the relationship between these elements should be. Is the following (MVC) setup the right way to do it?
Main class creates servlet(controller)
Servlet has a DAO defined in its class
DAO has a POJO defined in its class
Servlet communicates with the view (JSP page)
Please give your feedback.