ColdBox 3.0 installation on Railo

Hi,

I'm a veteran of CF, but new to Tomcat, Railo, and Coldbox. I'm
having a heck of a time getting things running. I'm on Windows 7 x64.

Here are the steps I followed:
1) install Railo/Tomcat into default directory with NO IIS connector

2) Created a folder for my dev work called "d:\development" with a
subfolder for my project - "myapp". The coldbox part of the project
is in a subdirectory called "mycfsubdir"

3) created a file in the Tomcat/conf/Catelina/localhost folder for my
application. "myapp.xml" that points to the proper folder "myapp"

4) create a folder for coldbox in "d:\frameworks\coldbox_3.0.0"

5) create a file in the Tomcat/conf/Catelina/localhost folder mapping
this directory to "coldbox"

tested my app mapping by requesting "http://localhost:8888/myapp/
mycfsubdir/robots.txt (which lives in the same directory as index.cfm)
- got proper results

test my coldbox mapping by requesting http://localhost:8888/coldbox/system/Coldbox.cfm
- I get "Not Permitted" - which indicates it finds the path

test the samples by requesting http://localhost:8888/coldbox/samples/index.cfm
- I get "invalid component definition, can't find
coldbox.system.Coldbox"

test my coldbox application by requesting "http://localhost:8888/myapp/
mycfsubdir/index.cfm"
- I get "invalid component definition, can't find
coldbox.system.Coldbox"

I don't have a lot of extra hair to begin with, so any additional
insight would be useful.

- Cam

The error is because it is trying to go through the handler.action and it
can't be found.

If you want to do this then you will need to setup different contexts for
the sample application you want to run.

Regards,
Andrew Scott
http://www.andyscott.id.au/

From: coldbox@googlegroups.com [mailto:coldbox@googlegroups.com] On
Behalf Of Cam
Sent: Saturday, 9 April 2011 6:03 AM
To: ColdBox Platform
Subject: [coldbox:9326] ColdBox 3.0 installation on Railo

Hi,

I'm a veteran of CF, but new to Tomcat, Railo, and Coldbox. I'm having a

heck

of a time getting things running. I'm on Windows 7 x64.

Here are the steps I followed:
1) install Railo/Tomcat into default directory with NO IIS connector

2) Created a folder for my dev work called "d:\development" with a
subfolder for my project - "myapp". The coldbox part of the project is in

a

subdirectory called "mycfsubdir"

3) created a file in the Tomcat/conf/Catelina/localhost folder for my
application. "myapp.xml" that points to the proper folder "myapp"

4) create a folder for coldbox in "d:\frameworks\coldbox_3.0.0"

5) create a file in the Tomcat/conf/Catelina/localhost folder mapping this
directory to "coldbox"

tested my app mapping by requesting "http://localhost:8888/myapp/
mycfsubdir/robots.txt (which lives in the same directory as index.cfm)
- got proper results

test my coldbox mapping by requesting
http://localhost:8888/coldbox/system/Coldbox.cfm
- I get "Not Permitted" - which indicates it finds the path

test the samples by requesting
http://localhost:8888/coldbox/samples/index.cfm
- I get "invalid component definition, can't find coldbox.system.Coldbox"

test my coldbox application by requesting "http://localhost:8888/myapp/
mycfsubdir/index.cfm"
- I get "invalid component definition, can't find coldbox.system.Coldbox"

I don't have a lot of extra hair to begin with, so any additional insight

would

I am not too sure what you are trying to achieve here, but you may need to do a mapping in Railo to create ‘/coldbox’
and point that to the colder where the coldbox fraework lives

see notes on Alternate Installation Methods
http://wiki.coldbox.org/wiki/Installation.cfm

For Railo, mappings are done here
http://localhost:8888//railo-context/admin/web.cfm?action=resources.mappings

That is a good point, you will need to add this to your application.cfc so that you can move the application around without having to always go into the admin to set this stuff up.

this.mappings[’/coldbox’] = getDirectoryFromPath(getCurrentTemplatePath()) & ‘…\coldbox’;

In my example here this is telling me that underneath the webroot, and the folder underneath that is my ColdBox directory. It would be best to use this as either a relative as I have done, or even as an absolute dir.

So seeing as you dir structure seems to be a lot different, then this would be your best and easiest option.

In your Application.cfc place this line in it.

this.mappings[’/coldbox’] = ‘d:\frameworks\coldbox_3.0.0’;

And that will map your ColdBox references in the Application.

Regards,

Andrew Scott

http://www.andyscott.id.au/

My intention had been to keep our development code and our frameworks code completely separate. I had thought that by putting our frameworks in its own tree we could keep multiple versions of coldbox available, and simply switch between them by changing the tomcat mapping of “/coldbox”, and leaving everything else untouched.

Failing that, it would have been nice to use the second this.mappings clause:

In your Application.cfc place this line in it.

this.mappings[’/coldbox’] = ‘d:\frameworks\coldbox_3.0.0’;

but the fact that cfcomponent extends coldbox.system.Coldbox in the very first line seems to put a damper on that. (at least that’s why I think it doesn’t work)

So I removed the tomcat mapping to “/coldbox” and put one in railo instead, and things see, at first glance, to be running.

Thanks for the tips.

You might wont to switch over to the none extended version, that’s the one I use.

Regards,

Andrew Scott

http://www.andyscott.id.au/

Use this file as your application.cfc format. It doesn't extend from
coldbox.system.coldbox

Application_noinheritance.cfc

- Gabriel