How to prevent ColdFusion MX from answering /servlet/* URL requests
Issue
By default, ColdFusion MX will try to answer any URL request for /servlet/*, which may cause an error or unexpected result. The workaround is to disable the ServletInvoker mapping in default-web.xml.
The ColdFusion Server configuration and J2EE configuration on JRun are configured to answer all requests for /servlet/*. This becomes problematic when installing and configuring ColdFusion with a web server with the same servlet mapping. The ColdFusion/JRun web server connector will intercept the request, even though ColdFusion is not specifically configured for the servlet.
Solution
Server Configuration
- Stop the ColdFusion service and the web server.
- Opencf_root/runtime/servers/default/SERVER-INF/default-web.xml for editing.
- Comment out the ServletInvoker mapping:
<!--<servlet-mapping><servlet-name>ServletInvoker</servlet-name><url-pattern>/servlet/*</url-pattern></servlet-mapping>-->
- Save the file.
- Restart the ColdFusion service and the web server.
J2EE Configuration on JRun
- Stop the ColdFusion server instance and the web server.
- Openjrun_root/servers/cfmx_server_instance/SERVER-INF/default-web.xml for editing.
- Comment out the ServletInvoker mapping:
<!--<servlet-mapping><servlet-name>ServletInvoker</servlet-name><url-pattern>/servlet/*</url-pattern></servlet-mapping>-->
- Save the file.
- Restart the ColdFusion server instance and the web server.
This content requires Flash
To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.
Download the free Flash Player now!
