I am creating a j2ee web appp and I have created the following packages
- com.cms.controller (to hold servlets)
- com.cms.business (to hold busines logic)
- com.cms.dao (to hold data access objects)
- com.cms.beans (to hold beans)
Now i want to write a functionality. So i have written a index.jsp
page which has action = /loginConroller
.
Now should I do the folling in loginController
?
Authentication authentication = new Authentication();
boolean flag = authentication.chekLoginCredentials(username, passwd)
Will Authentication
class consist of only one function?
Is this approcach correct?