I'm trying to use the setNextEvent() method in the OnRequestStart()
method of my app if a session variable doesn't exist. When I try to
use setNextEvent() I either get this error: The method setNextEvent
was not found in component coldbox.system.beans.requestContext. Which
is true because that method is in the coldbox.system.controller class
I think. If I don't get that error the page just does nothing at all.
I'm starting to think this might be a reserved method in TomCat?
Has anyone else run into this issue?
I'm running CF9 on TomCat 6.0.20.
Thanks,
Ben
If you are trying to check if a session value exists for security
reasons then I recommend that you check out the security interceptor.
- John
I can't access controller specific methods from the Framework inside
my handlers for some reason. I can dump out the controller class and
see all the methods in my views but once I try to access them inside a
handler it chokes. I've never run into this before, so I'm a bit
stumped.
I'll keep digging, unless someone knows off hand what might be causing
this. I'm running ColdBox 2.6.4, I'm going to test out 3.0 and see if
I get the same thing.
Thanks,
Ben
Judah
> --
> You received this message because you are subscribed to the Google Groups "ColdBox: A ColdFusion Framework" group.
> To post to this group, send email to col...@googlegroups.com
> To unsubscribe from this group, send email to coldbox-u...@googlegroups.com
> For more options, visit this group at http://groups-beta.google.com/group/coldbox
> For more information, visit http://www.luismajano.com/projects/coldbox
> For Documentation, visit http://ortus.svnrepository.com/coldbox/trac.cgi
<cffunction name="onRequestStart" access="public" returntype="void"
output="false">
<cfargument name="Event" type="any">
<cfscript>
oSession = getPlugin("sessionstorage");
if (not oSession.exists('user_id')) {
setNextEvent("general.dspLogin");
}
</cfscript>
</cffunction>
I've even gone into my default event and just tried to do this and get
the same error:
<cffunction name="index" access="public" returntype="void"
output="false">
<cfargument name="Event" type="any">
<!--- RC Reference --->
<cfset var rc = event.getCollection()>
<!--- Do Your Logic Here to prepare a view --->
<cfset Event.setValue("Company","My Company") />
<cfset setNextEvent("general.dspLogin") />
</cffunction>
I would definitely like to see if someone else runs into this issue.
Thanks,
Ben
I haven't set up TomCat to handle SES yet so I'm guessing it didn't
know how to redirect the request. Still kind of odd that ColdBox would
throw the error that it did.
But it looks like the problem is solved.
Thanks,
Ben
Cheers,
Judah