File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Login Page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Login Page" Watch "Login Page" New topic

Login Page

jasvinder Pal singh

Joined: Oct 04, 2011
Posts: 6

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
Posts: 6

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 is it different from other servlet approach of using jdbc connectivity.
Tushar Bhaware
Ranch Hand

Joined: Aug 13, 2012
Posts: 62

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.
Have fun.

Remember you have not inherited earth from your ancestor,you only borrowed it from your descendants.
I agree. Here's the link:
subject: Login Page
It's not a secret anymore!