application controller - Let’s Implement J2EE Application Controller Design pattern today

Let’s Implement J2EE Application Controller Design pattern today

Posted on

application controller - Let’s Implement J2EE Application Controller Design pattern todayI used to be studying Santosh Sir’s article on utility controller sample final night time. Those that have some understanding on J2EE design sample know the completely different between Entrance Controller and Utility controller sample. Struts 1.x is a greatest instance of each.

You may learn the Santosh Sir’s article on Front Controller and Application controller sample.

So Right this moment I’ve determined to implement utility controller design sample which may use java’s properties file to learn and configure controllers.

Begin with Controller interface.

View.java is a wrapper view resolver return from Controller’s execute technique.

ControllerConfig is used to carry controller’s motion with it’s class identify.

WebConfig is used to handle all controller configured in properties file. This class will learn, and make obtainable all controller Object to Most important Servlet.

And Final is our Entrance Controller servlet (AqsaServlet). Aqsa Servlet is a Centralized management in utility, a sigle entry level which handle Protocol Dealing with, Request Navigation and View Dispatching.

net.xml and controller config properties file will Look comparable under…

and ….

#Mapping file include key worth pair

login=com.xpert.controller.LoginController

register=com.xpert.controller.RegistrationController

Now it’s time to create a easy controller, and examine to check…

Download Code

Supply techzoo.org