setNextEvent() on CF9 running on TomCat

I'm not sure if this documented anywhere but I couldn't seem to find

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.


I'd be surprised if this has anything to do with tomcat as the
ColdFusion code is compiled to Java bytecode before it is executed.

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

But that still has nothing to do with my issue.

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

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.


Have you tried your code under any setup other than CF9 w/ Tomcat? If
you give us the exact code you are using, I can try to replicate it
with my setup here.


This is what I'm trying to do, nothing difficult.

  <cffunction name="onRequestStart" access="public" returntype="void"
    <cfargument name="Event" type="any">

      oSession = getPlugin("sessionstorage");

     if (not oSession.exists('user_id')) {





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"
    <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") />


I would definitely like to see if someone else runs into this issue.


I found the problem. Because by default SES URL's are turned on in the
config/routes.cfm file it was throwing things off.

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.


That is curious. I never use SES urls but I haven't explicitly turned
them off before and have not had a problem with setNextEvent. If I get
a chance later I'll still try and take a look at it to see if I see
the same problem.