Post a comment (login required)
Did you know you can develop Java servlets using ColdFusion MX? I found it easiest to start by enabling ColdFusion "standalone" mode, which however may not be best practice. The following assumes you installed ColdFusion under windows, to the default "CFusionMX7" directory:
Modify "C:\CFusionMX7\runtime\servers\coldfusion\SERVER-INF\jrun.xml". Near the bottom, in the block captioned "Built-in JRun Web Server", ensure the following is set:
<attribute name="deactivated">false</attribute>
This enables ColdFusion locally at: http://localhost:8500
Now just long-established servlet configuration and development follows. ColdFusion's servlet functionality lies within "C:\CFusionMX7\runtime\lib\jrun.jar" so specify it on the class path when compiling. Put your compiled servlet class in "C:\CFusionMX7\wwwroot\WEB-INF\classes". Add the appropriate "servlet" and "servlet-mapping" blocks to "C:\CFusionMX7\wwwroot\WEB-INF\web.xml", in particular specifying a url-pattern beginning with "/servlets/". Restart ColdFusion and your servlet should be available at a URL such as:
http://localhost:8500/servlets/CfmxServletDemo
In months to come we will explore WHY you might want to develop servlets under ColdFusion MX