How do I create a handler mapping for *.cfml with BonCode-Tomcat-CFM-Handler in IIS7 with Railo 4.x

363 views
Skip to first unread message

Charles Robertson

unread,
Nov 25, 2013, 6:53:01 PM11/25/13
to ra...@googlegroups.com
Hi everyone

Could someone tell me how I can create a handler mapping for '*.cfml' with BonCode-Tomcat-CFM-Handler in IIS7 with Railo 4.x
I can see one for '*.cfm', '*.cfc' etc, but nothing for '*.cfml'…

I cannot work out what I add for the Type attribute after I press Add Managed Handler

Some of my stylesheets use a '.cfml' extension...

Thanks

Charlie

Jordan Michaels

unread,
Nov 25, 2013, 7:19:18 PM11/25/13
to ra...@googlegroups.com
You would do something similar to this:
http://boncode.net/connector/webdocs/Tomcat_Connector.htm#_Toc349117790

... only you'd actually add the .cfml extension instead of the asterisk
that's shown there.

You also need to create a handler in Tomcat so that Tomcat knows to pass
the request off to the Railo servlet when it gets a request for it. All
the handler configs in Tomcat are in the default web.xml file in
tomcat/conf/web.xml.

This can be done with any extension; so, for example, you could have
.html and .css files interpreted by Railo without actually needing a
CFML-style extension.

Warm Regards,
Jordan Michaels

On 11/25/2013 03:53 PM, Charles Robertson wrote:
> Hi everyone
>
> Could someone tell me how I can create a handler mapping for '*.cfml'
> with BonCode-Tomcat-CFM-Handler in IIS7 with Railo 4.x
> I can see one for '*.cfm', '*.cfc' etc, but nothing for '*.cfml'�
>
> I cannot work out what I add for the Type attribute after I press Add
> Managed Handler
>
> Some of my stylesheets use a '.cfml' extension...
>
> Thanks
>
> Charlie
>
> --
> Did you find this reply useful? Help the Railo community and add it to
> the Railo Server wiki at https://github.com/getrailo/railo/wiki
> ---
> You received this message because you are subscribed to the Google
> Groups "Railo" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/railo/8182ac61-72f7-4c13-a3eb-c4383bd11f8b%40googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

Charles Robertson

unread,
Nov 25, 2013, 7:19:44 PM11/25/13
to ra...@googlegroups.com
OK. I found out. So for anyone who has the same predicament:

  1. Go into IIS
  2. Click on the relevant website
  3. Click on Add Managed Handler
  4. Copy & paste the value from the Type field of the 'BonCode-Tomcat-CFM-Handler' into your new Mangaged Handler type field
  5. [I opened 2 IIS7.5 windows side by side for ease of use]
  6. Name the Mangaged Handler 'BonCode-Tomcat-CFML-Handler'
  7. Press OK

ad...@establishmindfulness.com

unread,
Feb 6, 2016, 5:59:49 AM2/6/16
to Railo
Hi Jordan

Just so that I don't waste your time on my last question.

I have found that if I add the BonCode handler mapping for '*.cfml', to the server instance above 'sites' in the IIS directory tree, the entry is not added to the website's web.config file.
In a sense, it is a global handler mapping that is added to very website under IIS.

My web.config files are created & updated automatically by the system I am building.
Adding BonCode handler mappings to the web.config file, would break usability requirements, for users who do not use Railo/Lucee.
Adobe Coldfusion Application Server does not use the BonCode adapter.

You probably knew this answer anyway..

Thanks for your time...

Charlie

ad...@establishmindfulness.com

unread,
Feb 6, 2016, 6:00:12 AM2/6/16
to Railo
Hi Jordan. I know that I am picking up on old post, but I have come across a curious behaviour:

When I add the Boncode handler mapping in IIS7 for *.cfml, it creates an entry in the web.config file for the relevant website.
I see that although I have handler mappings for *.cfc & *.cfm in IIS, which were automatically created during the BonCode set-up, there are no similar entries in the web.config for *.cfc & *.cfm
The web.config entry only happens when the *.cfml mapping is created manually in IIS.

Do you know how I can prevent the handler for *.cfml from being written to the web.config file.
The reasons for this are complicated, so I won't bore you with the details.

Interestingly, when I remove the entry in the web.config file, the *.cfml entry in IIS is removed automatically, and my website design breaks [I use the .cfml extension for CF stylesheets & external CF javascript files]

Thanks for any insight you can provide on this.


Charlie

On Tuesday, November 26, 2013 at 12:19:18 AM UTC, Jordan Michaels wrote:

ad...@establishmindfulness.com

unread,
Feb 6, 2016, 1:15:05 PM2/6/16
to Railo
Thanks Jordan for your reply.

Unfortunately, the link you provided does not go to the hash mark in the document.

I am a little confused as to why you would not use *.cfml when create the new handler mapping in IIS?

And, I do not fully understand your extension explanation. Are you saying I can create an extension in 'Default MIME Type Mappings' in web.xml?

I have already added the following in web.xml for the handler mapping:

<!-- Mappings for the Lucee servlet -->
    <servlet-mapping>
        <servlet-name>CFMLServlet</servlet-name>
        <url-pattern>*.cfm</url-pattern>
        <url-pattern>*.cfml</url-pattern>
        <url-pattern>*.cfc</url-pattern>
    <!-- Basic SES Mappings -->
    <url-pattern>/index.cfc/*</url-pattern>
    <url-pattern>/index.cfm/*</url-pattern>
    <url-pattern>/index.cfml/*</url-pattern>
    </servlet-mapping>

But are you saying that I can fool the system into parsing cfml inside a file with a '.css' extension, some other way?
The thing is that I have some stylesheets without cfml in them and some stylesheets with cfml interspersed...

Thanks

On Tuesday, November 26, 2013 at 12:19:18 AM UTC, Jordan Michaels wrote:

Peter Boughton

unread,
Feb 6, 2016, 1:30:19 PM2/6/16
to ra...@googlegroups.com
> Thanks Jordan for your reply.

Jordan's reply was posted on the 26th November 2013. He has not posted on this mailing list in over six months, and probably wont see anything you post.

He is, however, active on the Lucee mailing list: https://groups.google.com/group/lucee

The Lucee group is where people using Lucee should post for help with Lucee-related issues.
Reply all
Reply to author
Forward
0 new messages