This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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: 60739
    
  65

Check for null.


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

Joined: Mar 24, 2008
Posts: 3816

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
 
Similar Threads
how to use session
Session question
can't i put int value in Session?
maximum size of the session object
Is there a limit to the size of object that can be kept in a session?