• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Loading application files outside CF app root (CF+JBoss)

Guest
Aug 23, 2010 Aug 23, 2010

Copy link to clipboard

Copied

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.

Ex:

    <virtual-mapping>
        <resource-path>/*</resource-path>
        <system-path>/apps/mycfapp</system-path>
    </virtual-mapping>

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

TOPICS
Advanced techniques

Views

2.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Aug 24, 2010 Aug 24, 2010

Copy link to clipboard

Copied

You might get a response here because there are people familiar with

JBoss but I think you will improve your chances if you ask this

question on one of the JBoss lists.

--

Mack

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 10, 2010 Sep 10, 2010

Copy link to clipboard

Copied

I need some help with this as well.

I think that it is a CF configuration issue and has nothing to do with JBoss.

My presumptions:

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.cfm, 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?

Thanks,

Rick

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Sep 10, 2010 Sep 10, 2010

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 12, 2010 Sep 12, 2010

Copy link to clipboard

Copied

LATEST

<Context cookies="true" crossContext="true" allowLinking="true">

Works like a champ!

Thanks a ton,

Rick

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation