Solved

Setting CF Mappings Per Application

Posted on 2003-11-24
6
187 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

Raise the IQ of Your IT Alerts

From IT major incidents to manufacturing line slowdowns, every business process generates insights that need to reach the people required to take action. You need a platform that integrates with your business tools to create fully enabled DevOps toolchains.

You need xMatters.

Question has a verified solution.

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

Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

691 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