Thanks Sana and Gary.
Actually i was using latest version on coldfusion 10.
I have download and used the coldbox 4.3.0.
I am using below code in my application.cfc to handle my old and new url.
`
public boolean function onRequestStart(String targetPage){
// Map physical files to events
// This will allow the old URL for the about page to remain unchanged from the URL.
// This is just an example to show how to do this in case you CAN’T break book marks.
// Of course, URL rewriting wold also be a valid way to solve this too.
fileEventMap=StructNew();
fileEventMap = {
‘/about.cfm’:‘main.about’,
‘/products/coldbox.cfm’:‘products.coldbox’
};
if(StructKeyExists(fileEventMap,arguments.targetPage ) || ( arguments.targetPage == ‘/index.cfm’))
{
if( StructKeyExists(fileEventMap,arguments.targetPage ) ) {
url.event= fileEventMap[arguments.targetPage];
}
// Verify ColdBox is loaded
reloadChecks();
processColdBoxRequest();
// Returning false prevents the legacy code from also kicking in
return false;
}
// Else proceed to legacy code
return true;
}
`
But I am getting below error .
When i open about.cfm. It is not taking the code based on handler specifed by
url.event= ‘main.about’
I am getting "Type: HandlerService.EventHandlerNotRegisteredException " error.
Can you please help me with this.
The same code is working thrugh commandpromt “Server start”