• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Confusion regarding Session = False

 
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Friends,

I have a confusion regarding Session=False.

In servlet when we use session=request.getSession(false); it does not create a new session, it returns the old session Object if it is present however

In JSP if we use session=false in page directive then we do not get the session object, hence how can we implement the above functionality.

Please guide.

Thanks
 
Enthuware Software Support
Posts: 4810
52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Poornima Sharma wrote:Hi Friends,

I have a confusion regarding Session=False.

In servlet when we use session=request.getSession(false); it does not create a new session, it returns the old session Object if it is present however

In JSP if we use session=false in page directive then we do not get the session object, hence how can we implement the above functionality.

Please guide.

Thanks



You can use an EL expression such as ${not(requestScope.session)} to check if the session exists or not. This may not be the exact expression that you need but you should play around with it to suit your needs.
reply
    Bookmark Topic Watch Topic
  • New Topic