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

logging mechanism

Sherif Shehab
Ranch Hand

Joined: Mar 05, 2007
Posts: 483

Hi ,
i'm developing a reporting system with a logging mechanism , to get the username and password from the jsp then check them with what in the DB in a servlet , then store the username in the session to use it in some stuff , i made logout mechanism too by making a link to execute a servelt that do removing the username from the session then invalidating the session then using request dispatcher to forward to the login page again , but i think this logout mechanism is poor design ,
So anyone can advice me with more powerful logout mechanism ?


Thanks,
Sherif
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61766
    
  67

I was confused until I realized that you meant "log in" rather than "logging". They are two different concepts.

What is it that you don't like about your design?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Sherif Shehab
Ranch Hand

Joined: Mar 05, 2007
Posts: 483

Bear Bibeault wrote:I was confused until I realized that you meant "log in" rather than "logging". They are two different concepts.

What is it that you don't like about your design?

Sorry i wrote the the subject wrong i meant "logout mechanism " , what i don't like in my design in the logout mechanism ...
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
Why do you thing your logout page design is a poor design. It sounds okay to me.


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
Sherif Shehab
Ranch Hand

Joined: Mar 05, 2007
Posts: 483

Bosun Bello wrote:Why do you thing your logout page design is a poor design. It sounds okay to me.

Because i think the logout mechanism it's too simple and i need it more powerful . am i right or wrong ?
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

"more powerful"? What extra functionality do you want to add?


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Sherif Shehab
Ranch Hand

Joined: Mar 05, 2007
Posts: 483

i don't know this why i asked the experts , or do you think the current logout mechanism is ok ?
Mohamed Inayath
Ranch Hand

Joined: Nov 22, 2004
Posts: 124
While invalidating the session no need to remove explicitly the session bound variables.
As it is implicit when you invalidate a session.

And regarding powerful, what you are expecting when you do a logout?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61766
    
  67

And the opposite is also true. If you remove the token from the session that indicates that a user is logged in, there's no need to invalidate the session. One or the other is sufficient.
 
 
subject: logging mechanism