setNextEvent() on CF9 running on TomCat

21 views
Skip to first unread message

Ben

unread,
Dec 29, 2009, 8:02:32 PM12/29/09
to ColdBox Platform
I'm not sure if this documented anywhere but I couldn't seem to find
anything.

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

John Whish

unread,
Dec 30, 2009, 11:58:20 AM12/30/09
to col...@googlegroups.com
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

Ben

unread,
Dec 30, 2009, 12:33:41 PM12/30/09
to ColdBox Platform
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
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 McAuley

unread,
Dec 30, 2009, 12:57:45 PM12/30/09
to col...@googlegroups.com
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.

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

Ben

unread,
Dec 30, 2009, 1:09:59 PM12/30/09
to ColdBox Platform
This is what I'm trying to do, nothing difficult.

<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

Ben

unread,
Dec 30, 2009, 1:55:25 PM12/30/09
to ColdBox Platform
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.

Thanks,
Ben

Judah McAuley

unread,
Dec 30, 2009, 2:00:13 PM12/30/09
to col...@googlegroups.com
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.

Cheers,
Judah

Reply all
Reply to author
Forward
0 new messages