getSession method was not found
Hi,
I am getting an error when I am trying a page
The getSession method was not found. Either there are no methods with the specified method name and argument types or the getSession method is overloaded with argument types that ColdFusion cannot decipher reliably. ColdFusion found 0 methods that match the provided arguments.
Earlier I was using coldfusion 7 and now I am using coldfusion 10. So I think coldfusion 10 now is not supporting. below is the code set where I am trying to use it. Is there any other way to overcome this?
<cfscript>
function getSessionList(){
var obj = "";
var i = 1;
var sessionlist = ArrayNew(1);
var enum = "";
obj = CreateObject("java","coldfusion.runtime.SessionTracker");
enum = obj.getSessionKeys();
for(;i lte obj.getSessionCount();i = i+1){
arrayAppend(sessionlist,obj.getSession(enum.next()));
}
return sessionlist;
}
</cfscript>