Solved

Setting CF Mappings Per Application

Posted on 2003-11-24
6
182 Views
Last Modified: 2013-12-24
Does anyone know if it's possible to set a cf mapping per application?

For example, say to you have 2 different sites running on the same machine with the following directory structure.

/wwwroot/site1
/wwwroot/site1/Application.cfm

/wwwroot/site2
/wwwroot/site2/Application.cfm

Is it possible to set a different mapping for "/" in each respective Application.cfm.

In site1, I'd like to map "/" to "/wwwroot/site1/" and in site2 I'd like to map "/" to "/wwwroot/site2/".

Image that you inheirt code from 2 different applications and both use the "/" mapping, how do you propose to get both these apps running without having to change a bunch of code.

Thanks.
0
Comment
Question by:cducker
  • 2
  • 2
6 Comments
 
LVL 17

Expert Comment

by:anandkp
ID: 9815676
Yes u can - just add a new mapping - name it as

1. /site1root/ & map it to "/wwwroot/site1"
2. /site2root/ & map it to "/wwwroot/site2"

this wld enable u to access ur code individually in both the applications !

U can also do the same for ur WebServer mappings ...

let me know ...

K'Rgds
Anand

PS : i dont know what do u mean by "Is it possible to set a different mapping for "/" in each respective Application.cfm"
0
 
LVL 1

Author Comment

by:cducker
ID: 9818640
Anand,

Thanks for the response.
I know I can create to mappings /site1root/ and /site2root/, but that won't solve my problem elegantly.

To be more specific, site1 and site2 are on the same server and running under different Applications.

/wwwroot/site1/
/wwwroot/site1/customtags/test/test.cfm

/wwwroot/site2/
/wwwroot/site2/customtags/test/test.cfm

The test.cfm custom tag has the same name in both applications, but the file's content is different. That means I can't put them both in a global custom tags directory because they do slightly different things.

Each site contains several imports, e.g. <cfimport taglib="/customtags/test" prefix="test" />.

I understand that I could go through each site and respectively replace all the cfimports with <cfimport taglib="/site1root/customtags/test" prefix="test" />, etc, but I don't want too. I'd rather create a mapping for "/" in each of the 2 sites. That way I don't have to change any code.

Please let me know if this makes sense? I also understand that I could also rework all the code to use cfmodule, but I have read that cfmodule is much slower in CFMX than cfimport.

Thanks.




0
 
LVL 1

Author Comment

by:cducker
ID: 9819398
Anand,

Thanks for you help, but I've found my solution. I will run multiple instances of CFMX; that way each site can have it's own settings. It appears that there are also some other advantages to doing this.

http://www.macromedia.com/devnet/mx/coldfusion/j2ee/articles/multiple.html

Thanks again,
Cory
0
 
LVL 17

Expert Comment

by:anandkp
ID: 9822432
NO Objections !
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 9838305
PAQed, with points refunded (125)

Computer101
E-E Admin
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question