• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

checking wheather session is new or not using EL

 
avi sinha
Ranch Hand
Posts: 453
Google Web Toolkit Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

i have tried ${session.new}. i was expecting a boolean value to be printed but didn't get anything.

is there any other method by which we can identify whether the session is new or not in jsp

avi sinha
 
srinivas srinivasmeenavalli
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you would able to decide on either session id or Last Accessed Time
I am not 100% sure on the solution. refer getId() or getLastAccessedTime()
 
Ankit Garg
Sheriff
Posts: 9577
33
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no session variable in EL, you'll have to go through pageContext object to get session i.e. ${pageContext.session.new}
 
avi sinha
Ranch Hand
Posts: 453
Google Web Toolkit Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks ankit my mistake

avi sinha
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic