• Post Reply Bookmark Topic Watch Topic
  • New Topic

session handling

 
Samanthi perera
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i need to handle session in my project.

i ma using this logic

 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't understand the random formatting--formatting is actually important, as it makes understanding overall structure really easy:While it's hard to tell, you might be setting the user to something even if they're not a new user.

But I'm not clear on what the question is since you didn't actually ask one--were you asking if this was one way to do it?
 
Samanthi perera
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it is simple thing.
if user log into system and after sometime he try to come back.
after 10 minutes.
then already session is there .so he doesn't need to ask username of password.
automatically goes to the welcome page.

but if there is no any session actively he need to provide username and password to log in.

i need to impliment this facility.
can anyone help me?
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
first of all, *define* the new user .
 
Samanthi perera
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is the mean define the user?
 
Samanthi perera
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
new user means there is no any session related to this user available.
so we need to check database tables for authentication.
old user means there is session available for this user.so no need to check databse.
 
Samanthi perera
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://java.sun.com/developer/onlineTraining/Programming/JDCBook/Code/login/LoginServlet.java

i found this tutorial.but it is very comple.
1)can anyone give me simple and complete exaple?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!