Accessibility
Adobe
Sign in My orders My Adobe

Title

How to change the context root of ColdFusion MX running on JRunProducts affected

This TechNote contains information regarding changing the context root of ColdFusion MX installed as a J2EE application running on JRun.

The ColdFusion MX installer allows you to specify a context root during the installation process. However, it is also possible to modify this context root after ColdFusion MX has been deployed on JRun. This may be done either through the JRun Management Console (JMC), or by editing an XML file.

If you make this change through the JMC, the appropriate XML file will be updated and ColdFusion MX will automatically be re-deployed.

  1. Start the JRun admin server if it is not already running. The JMC runs on port 8000 by default and can be accessed by requesting http://localhost:8000.
  2. Drill down into the cfusion Enterprise Application (if ColdFusion MX is installed as an EAR) and select the "Macromedia ColdFusion MX" Web Application. The context root, referred to here as the context path, may be edited in the "General Settings for Macromedia ColdFusion MX" table.

You may also choose to change the context root by editing either the application.xml or jrun-web.xml file manually. However, you should first understand how JRun determines the context root setting. When ColdFusion MX is first installed, the installer sets the context root in the \META-INF\application.xml file. For example:

C:\JRun4\servers\cfusion\cfusion-ear\META-INF\application.xml.

This is a standard location understood by all J2EE servers. The context root setting looks like this:

 <web><web-uri>cfusion-war</web-uri><context-root>/cfmx</context-root></web> 

You may change the context root in this application.xml file if you did not previously change the context root via the JMC. However, if you change the context root via the JMC, the setting is written to the \WEB-INF\jrun-web.xml. For example:

C:\JRun4\servers\cfusion\cfusion-ear\cfusion-war\WEB-INF\jrun-web.xml

The context root setting looks like this:

 <context-root>/cfmx</context-root> 

The jrun-web.xml file is a JRun-specific XML file that is not used by other J2EE application servers. When an application is deployed, JRun first looks in this jrun-web.xml file. If the context root exists in jrun-web.xml, then that is used as the context root. If the context root does not exist in jrun-web.xml, then JRun will use the context root defined in application.xml. Therefore, it is best to make this change in the jrun-web.xml to ensure the change is always picked up by JRun.

Additional Information

Unable to access the CFMX Administrator after changing context root to /

Doc ID
(5b768c0a)

Last updated
2009-03-18

Products affected

Contacting Adobe Support

Still need help?
Find out about all your support options.
Contact support