I have CF9 installed as an EAR file in JBoss 5.1.0 ($JBOSS_HOME/server/default/deploy/cfusion.ear -- on local disk). I would like to place the custom application files on a shared file system (e.g. /apps/mycfapp) outside of the path $JBOSS_HOME/server/default/deploy/cfusion.ear/cfusion.war. With JRun, you could map to a different resource path by modifying cfusion.ear/cfusion.war/WEB-INF/jrun-web.xml.
Is there a way to modify/specify the path to the custom application files with other application servers? Or is this not possible at all and all of the files must be deployed into the $JBOSS_HOME/server/default/deploy/cfusion.ear/cfusion.war directory?
Desired behavior: When I access http://www.mydomain.com/cfusion/index.cfm, ColdFusion would load index.cfm from /apps/mycfapp/index.cfm instead of $JBOSS_HOME/server/default/deploy/cfusion.ear/cfusion.war/index.cfm
I need some help with this as well.
I think that it is a CF configuration issue and has nothing to do with JBoss.
1. On a linux box, I "should" be able to make a symlink in the cfusion.war directory that points to a external directory that contains .cfm files.
2. CF has a "Server Settings -> Mappings" page that I think "should" allow this to work.
So far, I can't get either of these 2 techniques to work.
My particular intallation is on RHEL5, using JBoss 5 and CF9.
I installed CF9 as an EAR in the JBoss deploy directory.
For me, that is: /opt/JBoss/server/default/deploy/cfusion.ear
If I put a "test.cfm" file in /opt/JBoss/server/default/deploy/cfusion.ear/cfusion.war/rick/test.cf m, it works fine.
But, I need to place the .cfm files on a shared drive that is outside the cfusion.war directory structure.
I expected that a symbolic link in the cfusion.war directory that pointed to my shared directory would work, but it does not.
For example if I replace the "rick" directory with a symlink that points to /cfmfiles, I would expect that to work.
OR, if that doesn't work then I would expect that I could create a mapping from the CF Administrator that points logical path "/rick" to "/cfmfiles" directory path. That does not work either.
So, is there any way to configure CF9 on JBoss that allows me to put the .cfm files somewhere other than the cfusion.ear/cfusion.war directory?
Actually, I took a similar approach as you with the symlinks and got things to work. Make sure you have symlinks enabled.
I'm using JBoss 5.1.0 --
1. Go to $JBOSS_HOME/server/default/deploy/jbossweb.sar
2. Edit context.xml
3. Add allowLinking="true" to <Context ...>
4. Restart JBoss
See if that does the trick.