I'm brand new to ColdFusion and to ColdBox, so please forgive me if I
have missed anything terribly obvious. Please feel free to say RTFM...
just point me to a URL
Short version of the problem: With default everything, I'm having
problems where the routes that are being generated for my event
handlers are incorrect.
I have ColdFusion Developer edition installed locally as a standalone
server w/ JRun.
I have FlashBuilder on which I've installed CF Builder and have set up
my local server.
I downloaded the M6 release of ColdBox and installed it as 'coldbox'
in my wwwroot.
I installed the Platform Utilities CFBuilder extensions.
I created a new CF Project called "VTMO" with the application
directory as wwwroot/VTMO.
I used the ColdBox extension to initialize a new ColdBox Advanced app.
I fired up http://localhost:8500/VTMO/index.cfm on my server...
However, when I click on the General link, the contents of the page
appear to reload and the event handler links now look like this: http://localhost:8500/General
Obviously they don't work.
If, instead of clicking on "General" initially (when the link urls
were correct), I clicked on "Main" there is a redirect to: http://localhost:8500/General/index which is not found.
I assumed this was because my appMapping configuration was wrong/
missing, so I added/updated the value in my ColdBox.cfc to reflect
"VTMO". The result was the same even after reloading the framework. I
also tried renaming the coldbox.xml.cfm.bak and changing the setting
there as well with the same result. Do I need to use the xml file if
I'm changing the cfc?
So, I'm not sure where to start at this point. Any help would be
GREATLY appreciated.
Not at a machine w ColdBox right now, but look for a setting called
something like URL Rewrite Rule. It's intended to support url munging
by the web server, including adding the 'index.cfm' portion for
certain urls. I think the default works with that configuration; take
a look at the other choices. I think it was there in the app generator
too, so i think you'll see the choices there if you pretend to start
another site. Check the docs about that too.
Whatâs odd is that the Event Handlers have the correct URL the FIRST time the page loads #event.buildLink(handler)#.
After that they change URLs. I looked through the config and could only find a couple of settings related to URL â BaseURL and htmlBaseURL which should reflect whatever I change in routes. I havenât made any changes in routes. The difference between the the working URLs is more than just the index.cfm being dropped, it also drops the base path of the app.
I guess my questions are: a) Why would these urls only behave correctly the first time the page loads and b) shouldnât this work out of the box given that itâs a default app?
I did buy the book and have been reading through it on my iPad for about a week. Itâs pretty helpful.
I was able to make the entire app behave as it should by disabling the routes interceptor through âsetEnabled(false)â. Though I donât think I should have to disable it.
This is what it looked like out of the box though. It looks like it would work if I had AppMapping set correctly. Maybe I need to couple it with setBaseURL and htmlBaseURL settings?
// General Properties
setEnabled(true);
setUniqueURLS(false);
//setAutoReload(false);