Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Setting CF Mappings Per Application

Posted on 2003-11-24
6
Medium Priority
?
195 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
What You Need to Know when Searching for a Webhost Provider
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

636 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