Let’s say that your development, production and QA environments all want to play around with the ColdFusion administrator settings independantly of the actual application code. Development checks code into CVS, QA verifies it and a build is cut to production. What would happen if the administrator settings were different in each environment? Doesn’t sound like a very stable, or safe, process. One way around this is to have your ColdFusion root directory located completely outside your deployment path, perhaps even on a network drive. Here’s how to start.
Now you’ll be modifying the WEB-INF\web.xml file in several places. Here’s an example – your deployment directory path for your application is…
C:\jboss-4.0.1\server\default\deploy\myapp.war
Now let’s say that when production gets a new build, that they must delete the entire JBoss directory and deploy a completely new one from the build. You want to house your persistent files outside of that directory, such as…
C:\PersistentData
In your myapp.war\WEB-INF\web.xml file, you must change the value for all instances of the following properties to point to your persistent data folder.
For this specific example, one value would be…
<context-param id="macromedia_context_89">
<param-name>cf.lib.path</param-name>
<param-value>../../../../../../PersistentData/cfusion/lib</param-value>
</context-param>
Once all are changed, ColdFusion – on startup – will now look in that location for all of its required libraries.
8 Responses for "ColdFusion From Anywhere"
Steve, I am trying to get CF7 running on JBoss and have a question or two for you, but I can’t find your email anywhere. Can you shoot me an email and I will repsond? Thanks.
[...] For more advanced configurations of JBoss, here are some links to other relevant posts. Running multiple ColdFusion instances Securing your JBoss web applications Hosting multiple domains in JBoss Flexible ColdFusion deployment – serving from anywhere [...]
Hi Steve,
I tried changing paths for some of the ColdFusion servlet setup in the new Scorpio beta web.xml file.
But I wasn’t successful.
While searching the internet for why that might be, I saw something about Flex2 having to be hardcoded under web-inf — don’t know if that is true.
Have you given that a go yet?
Thanks
@George, I just downloaded the Scorpio beta the other day, but haven’t had a chance to install it yet (still in Guatemala), but in the next week, I’ll be doing it and will post a message on what I find.
[...] I downloaded CF8 and followed my typical procedures for deploying on JBoss. Everything worked fine. JBoss started up without any errors and I could hit my applications. Then I decided to see if I could still customize the deployment by moving the core ColdFusion files outside the deployment directory and that went without a hitch. I don’t know why, but I was concerned that they might take that option away. [...]
In this post you say deploy coldfusion with the war option, however the war option only gives you a war file there no way to extract it, did you mean ear instead?
A WAR file is just a ZIP file.
Ok so i went ahead and followed your article and moved cold fusion to a directory outside of the deploy. I set everything up and local host comes up fine and serves coldfusion pages. Now i setup a second site, and followed one of your other articles to setup a second site and add a host to server.xml. Now I moved a cfide and web-inf directory into my second site. Now when i go to my second site it serves cold fusion pages as well but its a separate instance, when starting jboss its two instances of cold fusion that come up, and the cold fusion administrator is not the same for both sites. Any thing you might know that I am doing wrong. Should i not put the cfide and web-inf directory in the second site?
Leave a reply