[coldbox-3.5.2] SES URLs not working

Hi folks,

Newbie to ColdBox and running Railo (Railo 3.3.5.004 final) on Glassfish (GlassFish Server Open Source Edition 3.1.2) on top of Centos.

Having an issue getting SES URLs to work ‘out of the box’. Have trawled the forums, read the book and looked online but can’t quite figure where i’m going wrong. Most examples cater for http://localhost:8080/index.cfm/General/index style URLs.

I don’t want to complicate matters so I’m keeping it, for the time being, fairly simple (keeping the index.cfm without using Tuckey rewriting).

I have URLs like the following which work ok as expected:

http://localhost:8080/railo/myappname/index.cfm?event=General.index

http://localhost:8080/railo/myappname/index.cfm?event=General.reg

However, when i try the following SES URLs i get 404 errors:

http://localhost:8080/railo/myappname/index.cfm/General/index

http://localhost:8080/railo/myappname/index.cfm/General/reg

Can someone point out where I might be going wrong? Do I need to create mappings to eradicate /railo/myappname/ from the URL or is there something i can just modify/add to the ColdBox setup??

My configs are as follows:

AppMapping is ‘myappname’
isSes is true

coldbox.cfc
interceptors = [
//Autowire
{class=“coldbox.system.interceptors.Autowire”,
properties={}
},
//SES
{class=“coldbox.system.interceptors.SES”}
];

Routes.cfm
// Allow unique URL or combination of URLs, we recommend both enabled
setUniqueURLS(false);
// Auto reload configuration, true in dev makes sense to reload the routes on every request
//setAutoReload(false);
// Sets automatic route extension detection and places the extension in the rc.format variable
// setExtensionDetection(true);
// The valid extensions this interceptor will detect
// setValidExtensions(‘xml,json,jsont,rss,html,htm’);
// If enabled, the interceptor will throw a 406 exception that an invalid format was detected or just ignore it
// setThrowOnInvalidExtension(true);

// Base URL
if( len(getSetting(‘AppMapping’) ) lte 1){
setBaseURL(“http://#cgi.HTTP_HOST#/index.cfm”);
}
else{
setBaseURL(“http://#cgi.HTTP_HOST#/railo/#getSetting(‘AppMapping’)#/index.cfm”);
}

// Your Application Routes
addRoute(pattern=":handler/:action?");

/** Developers can modify the CGI.PATH_INFO value in advance of the SES
interceptor to do all sorts of manipulations in advance of route
detection. If provided, this function will be called by the SES
interceptor instead of referencing the value CGI.PATH_INFO.

This is a great place to perform custom manipulations to fix systemic
URL issues your Web site may have or simplify routes for i18n sites.

@Event The ColdBox RequestContext Object
*/
function PathInfoProvider(Event){
/
Example:
var URI = CGI.PATH_INFO;
if (URI eq “api/foo/bar”)
{
Event.setProxyRequest(true);
return “some/other/value/for/your/routes”;
}
*/
return CGI.PATH_INFO;
}

web.xml

CFMLServlet *.cfm CFMLServlet *.cfml CFMLServlet *.cfc

Regards
RJ