I am new to java language,so need help from you guys.
Which is the best approach to make a login page using servlet and jsp with oracle as backend.
As far i have read in ,configuring database connectivity through init method and passing the response to the respective jsp. Is it the standard version which is used in all the major IT companies.
Jasvinder Pal Singh
jasvinder Pal singh
Joined: Oct 04, 2011
I checked few example for login page in internet,why do we use a separate class as connection factory or dao. to set up the connection with database.how is it different from other servlet approach of using jdbc connectivity.
We use dao(data access object) to make connection with database and do some work on it.
We use servlets as controllers for passing control from one servlet/jsp/dao/beans to other servlet/jsp/dao/beans.
We use Jsp as view (no business logic in it).
We use beans for business logic.
We do all these for modularity. We want separation of responsibilities.
I guess you got my point.
I hope i was any help.
Remember you have not inherited earth from your ancestor,you only borrowed it from your descendants.