Processing ColdFusion using .htm and .html files with Lucee

If you want Lucee to use the .htm and .html file extensions instead of (or in addition to) .cfm and .cfml you can set this up in 3 quick steps.

1. Stop Lucee
2. Edit the web.xml file located at

<Lucee Install Dir>/conf/web.xml

From:

<servlet-mapping>
     <servlet-name>CFMLServlet</servlet-name>
     <url-pattern>*.cfc</url-pattern>
     <url-pattern>*.cfm</url-pattern>
     <url-pattern>*.cfml</url-pattern>
     <url-pattern>/index.cfc/*</url-pattern>
     <url-pattern>/index.cfm/*</url-pattern>
     <url-pattern>/index.cfml/*</url-pattern>
</servlet-mapping>

To:

<servlet-mapping>
     <servlet-name>CFMLServlet</servlet-name>
     <url-pattern>*.cfc</url-pattern>
     <url-pattern>*.cfm</url-pattern>
     <url-pattern>*.cfml</url-pattern>
     <url-pattern>*.htm</url-pattern>
     <url-pattern>*.html</url-pattern>
     <url-pattern>/index.cfc/*</url-pattern>
     <url-pattern>/index.cfm/*</url-pattern>
     <url-pattern>/index.cfml/*</url-pattern>
</servlet-mapping>

3. Start Lucee

3 thoughts on “Processing ColdFusion using .htm and .html files with Lucee

  1. Hi Chris, I followed these instructions, but Lucee processing html files. Are there any other steps? I tried in vain to add a script map to BonCodeIIS.dll.

    Are there any other steps missing?

    Thanks in advance.

  2. Thanks for the quick response. Actually, I got it to work by creating a managed handler instead. I just copied the one BonCode created for cfml and applied the pertinent HTML changes. See below:

    *.html

    BonCodeIIS.BonCodeCallHandler,BonCodeIIS,Version=1.0.0.0,Culture=neutral,PublicKeyToken=ad590a40d40745cf

    BonCode-Tomcat-HTML-Handler

Leave a Comment