GeeCON Prague 2014*
The moose likes Servlets and the fly likes checking the availbility of an object in session Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Servlets
Bookmark "checking the availbility of an object in session" Watch "checking the availbility of an object in session" New topic
Author

checking the availbility of an object in session

yuvaraj KumarAmudhan
Ranch Hand

Joined: Aug 22, 2009
Posts: 110
can i check whether a particular object is available in session?
if yes, how can?

thanks

yuvaraj
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61309
    
  66

Check for null.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3833

Getting attribute from HttpSession is done through getAttribute(String) method. If that object was bound before you'll have a non-null reference.


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
yuvaraj KumarAmudhan
Ranch Hand

Joined: Aug 22, 2009
Posts: 110
thank you
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: checking the availbility of an object in session