It's not a secret anymore!
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 Building Microservices this week in the Design 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: 63227
    
  69

Check for null.


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

Joined: Mar 24, 2008
Posts: 3899
    
    9

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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: checking the availbility of an object in session
 
It's not a secret anymore!