• Post Reply Bookmark Topic Watch Topic
  • New Topic

Check session  RSS feed

 
Antonio Correia
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello ,
I am making a website and I would like to check if there is session before entering into any page someone I know how to explain how I can do this ?



Thank you .
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 37255
519
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A new session or one that the user has been using? It is common to put a special attribute in the session on login so you can remember the user. You could apply this technique to see if the user has already been "welcomed" without loging in as well.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66207
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The presence or absence of a session is not something you should be checking for. This is a common novice error. See Jeanne's post regarding putting scoped variables in the session and testing for them.

P.S. Unless you do something overt, a JSP will always have a session created automatically.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!