This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Login Page

 
jasvinder Pal singh
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

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.


Regards
Jasvinder Pal Singh
 
jasvinder Pal singh
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

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.
 
Tushar Bhaware
Ranch Hand
Posts: 62
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,
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.
Tushar
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic