Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

can anybody help ??????????

 
devika cha
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am developing an web application where in i allow members only to get in , i want check if they are member or not on each login , and if there userid password does not exist in my db then direct them to member form.

can anyone give idea as to how this can be acheived.

thanks.
 
Colin Fletcher
Ranch Hand
Posts: 200
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out the security-constraint in web.xml
 
Richard Bradford
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use a session attribute to check if a user has logged in or not.
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you just check the username and password inside your DAO and throw an exception there if not found. then catch the exception and set an appropriate message and forward the user on error page or login page again with that message.

how it sounds??
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Richard Bradford:
Use a session attribute to check if a user has logged in or not.


Richard I think its not about to check the active user. its about authenticating the user instead.

By the way wht happened to the saloon colors. Or i turned color blind. whatever its not lookig nice or may be me require sometime to get used to of it.
[ October 01, 2004: Message edited by: adeel ansari ]
 
Richard Bradford
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by adeel ansari:


Richard I think its not about to check the active user. its about authenticating the user instead.

By the way wht happened to the saloon colors. Or i turned color blind. whatever its not lookig nice or may be me require sometime to get used to of it.

[ October 01, 2004: Message edited by: adeel ansari ]

Ah, you are correct. I hadn't fully woken up when I posted.

The forum is grey in memory of Philippe Maquet who sadly died recently.
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes yes. i felt sorry for that. although i haven't interact with him but i read a lot about him from bartenders, sheriffs, etc.

Phillipe you made our forum gray and turned our lives black and white.

Sorry for posting it here, in servlet forum, i just would like to thanks Richard for reminding me about the death of a genius.
 
Ramaswamy Srinivasan
Ranch Hand
Posts: 295
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Adeel,



You just check the username and password inside your DAO and throw an exception there if not found.


I too second that. That's the way i handle it and am quite successful with that approach.


And Devika, you can use this.... It's simple and at our disposal.

Cheers,
Swamy
 
devika cha
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey, thanks everybody i feel that's a good idea too, and try it out .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic