Naming Components from the Application Root

My Coldfusion Web Root is: C:\ColdFusion8\wwwroot
My Application Root is: C:\ColdFusion8\wwwroot\mydomain.com
I have a component in my application called datasource and it
is located at:
C:\ColdFusion8\wwwroot\mydomain.com\system\datasource.cfc
I want to be able to call this component based on my
application root so that it can be referenced as
"system.datasource". As that is the path to the component once I
upload the site to my web host. Is it possible to do something to
make this happen?
I have found that if I do the following in Application.cfc it
makes it work, but I have a feeling this is not a recommended
option:
<cfset this.customtagpaths =
"C:\ColdFusion8\wwwroot\mydomain.com" />
Does that open me up to any problems or vulnerabilities?
The reason I do not want to use a mapping is that I am trying
to make these components reusable for other applications as well,
and if you use a mapping then the first part of the component name
changes from app to app.
Any help or suggestions would be greatly appreciated.
Thanks!

jeby,
You can accomplish this several ways but first, I wanted to
note that I do not know of any specific vulnerabilities with adding
the custom tag paths to an Application. There certainly could be
and I'll leave that issue to anyone else that might have a more
knowledgeable opinion.
One approach I could suggest is to create a Virtual Host on
your development machine for each application on which you're
working. That's probably not the right lingo for IIS but here's
what I mean.
BTW - I'm guessing you're using IIS since your web and
application roots show a Windows system but the same basic
principles apply to Apache.
In IIS Admin, setup a new web site. Assign this site to a
custom domain name, such as dev.mydomain.com and point the site to
the application root directory you note in your original post.
Then, open the Windows Hosts file, which should be located in
C:\Windows\System32\drivers\etc (Wiki link about Host file:
http://en.wikipedia.org/wiki/Hosts_file).
Edit the host file so that your custom domain name is there.
Typically, this means adding a new line to the file with content
similar to the following:
127.0.0.1 dev.mydomain.com
Anytime you point the browser on your local machine to
http://dev.mydomain.com, the
host file will intercept the request and make your local IIS serve
the site.
As a result, the path system.datasource should begin its
search from the top domain directory (your application root) and
work down. This should work and mirror your production machine
based on your description.
If you want to have these components available across many
applications running on the same server, you can add them to a
"dedicated" directory on the server and create a global mapping in
the CF Administrator.
For example, I have a utilities folder on all my Windows
servers. This folder contains all sorts of CFCs I reuse (getting US
States and Canadian Provinces for a form select list, date/time
functions, etc.) across many applications. I have a mapping in my
CF Administrator(s) called ulitities, which points to the
aforementioned directory. In all my applications, I instantiate a
CFC from this directory as follows:
<cfscript>
myObj =
createObject("component","utilities.StatesAndCountries.States");
</cfscript>
Hope this helps!

Similar Messages

  • Is there a way I can still install apps from the Applications disc on Mavericks?

    A few weeks ago, I was installing a new SSD into a 2009 MBP. I reinstalled Snow Leopard from the disc that came with the computer and proceeded to upgrade to Mavericks. Unfortunately, unbeknownst to me, you cannot install the iLife applications (namely, iPhoto) from the Applications disc once you upgrade past Snow Leopard. Is there a way I can still install these applications without having to buy them through the app store?

    Pacifist may be able to do it - it does cost money
    http://www.charlessoft.com

  • PS CS4 64-bit (in Web Premium CS4) on Win 7 PC.  I did a duplicate file check on my hdd and deleted dup files. Now I get "Some of the application components are missing from the Application directory, Please reinstall.."

    PS CS4 64-bit (in Web Premium CS4) on Win 7 PC.  I did a duplicate file check on my hdd and deleted dup files. Now when I try to run PS 64-bit I get "Some of the application components are missing from the Application directory, Please reinstall the application." When I do this, it seems to install correctly until the very end, then it says "Installation Complete With Errors", and when I try to run I get the same 'component missing message'. What can I do? PS 32 bit runs fine. Some of the other applications ib Web Premium say the shortcut has been changed or removed. I appreciate your help...Thank you

    Best advice I can think of is to uninstall and run the Clean Script from here.
    Adobe - Adobe CS4 Clean Script

  • I tried to open Photoshop Elements 11. I got a message that components of the application are missing and that I needed to reinstall Photoshop Elements. I purchased the software by downloading it from Adobe so how can I reinstall it?

    I tried to open Photoshop Elements 11. I got a message that components of the application are missing and that I needed to reinstall Photoshop Elements. I purchased the software by downloading it from Adobe so how can I reinstall it?

    Are you launching Pages from an icon in your Dock? Installing the update does not change the Dock icons & it does not remove the older versions. Go to your Applications folder & launch the new Pages from there.

  • 'Some of the application components are missing from the Application directory. Please reinstall the application.'

    I tried opening PS and this message popped up 'Some of the application components are missing from the Application directory. Please reinstall the application.' I cannot find the Reinstall button?

    I followed these instructions but cannot find how to reinstall PS. When I click on the membership link the page displays as NOT BEING FOUND.
    Quit all applications. 
    In the Finder, navigate to the Photoshop application folder. 
    Do one of the following: 
    If the Locales folder is not listed within the application folder, then skip to Step 5.
    If the Locales folder is listed within the application folder, then drag the Locales folder to the Trash.
    Choose Finder > Empty Trash. 
    Start the installer for Photoshop or your edition of the Adobe Creative Suite. 
    If you purchased boxed software, then insert the installation DVD-ROM into your computer's DVD drive.
    If you purchased downloadable software from the Adobe Online Store, then double-click the disk image (.dmg) file or files that you downloaded. (If you no longer have the downloaded disk image file or files, then log in to your account at www.adobe.com/membership to download the installer.)

  • Some of the application components are missing from the Application directory, Please reinstall the

    Some of the application components are missing from the Application directory, Please reinstall the application. This is what i am getting tying to open Photoshop Cs6???

    Renée in the future when removing Photoshop CC please utilize the uninstaller located in the Applications/Utilities/Adobe Installers folder.  Please run the uninstaller and then reinstall.  If you continue to face difficulty reinstalling Photoshop CC then please see CC desktop lists applications as "Up to Date" when not installed - http://helpx.adobe.com/creative-cloud/kb/aam-lists-removed-apps-date.html.

  • When i scan my ipod from the application named find my ipod touch 4 it simply shows location unavailable while that of my cousin's ipod touch exactly shows the same location..... Why does that happen???

    When i scan my ipod from the application named find my ipod touch 4 it simply shows location unavailable while that of my cousin's ipod touch exactly shows the same location..... Why does that happen???

    When you go to the Google Maps app on the iPod does it correctly find your location? The iPod's locations service uses the location of the a nearby wifi router to locate te iPod.  However, not all routers are in Apple's database and as of yet nobody here knows of a way to add routers to the database.

  • Just updated my iMac to OS X Yosemite and my Photoshop will no longer open. Pop up message informing Some of the application components are missing from the Application directory. Please reinstall the application. I have the pay monthly package and don't

    Just updated my iMac to OS X Yosemite and my Photoshop will no longer open. Pop up message informing, Some of the application components are missing from the Application directory, Please reinstall the application. I have the pay monthly package and don't know where to start.

    Do as it says: Reinstall the program. Run the cleaner tool and let CC app do the magic.
    Use the CC Cleaner Tool to solve installation problems | CC, CS3-CS6
    Mylenium

  • Own CS5, will not open, message says, "Some of the application components core missing from the Application Directory.  Please reinstall the application".  What do I do?

    What now?  Can't get a phone number  to contact Adobe???????????????

    Hey Cal do u have a windows box or apple? Do you have the compressed files from the original download or a backup or image of your computer? Last question for now-please describe the events that led up to the error message in your original question. Like " my girlfriend was mad at me and while I was cleaning up some photos in CS5 she cut the electric to my desktop!"
    there is a chance if its a windows box and its running the OS win7, win 8, win8.1 and the systems restore setting turned on that if you can remember the last time(date) that CS5 worked: restore it(the computer) to that date or before that date. Also is there are some other options if its a mac but i need to know the operating system version and other info as to what other software is on your machine plus similar info like sw such as mackeeper, boot camp. parallels that another adobe community member(Bo LeBeau ) alluded to.
    Provide me more info and i can/will help you! maybe even a way to minimize your cost of paying for adobe support if that what you wanna do.
    Another vector that may be worth the effort is: find out generally or exactly what components are missing/corrupted from the application core sometimes there can be confusion(zip software posing as malware) or use in the mac and windows world of wrong procedures and use of decompression of compressed( ie winzip vs winrar) files that lead to CS5 working and all of a sudden not working. Last even installers can get flaky over time. So i know you wanna handle this so u can use CS5; but I need some more info. Have a good one! later and greater!

  • CS5 Photoshop I get the message: Some of the application components are missing from the Application directory, Please reinstall the application.

    When trying to open Photoshop CS5 I get the following Message: Some of the application components are missing from the Application directory, Please reinstall the application.
    Can I get these components downloaded as my optical drive is broken.

    Download CS5 products

  • Error "Some of the application components are missing from the Application directory, Please reinsta

    I downloaded Photoshop Extended about a week ago... the second time I opened it, an error message came up saying "Some of the application components are missing from the Application directory, Please reinstall the application."  So I uninstalled it, then re-intalled it.  I was able to open it successfully after that - and I used it once.  I have just gone to open it again and it is reading the same error.  This is very frustrating - why is it doing this?  I don't want to have to unintall and reinstall everytime I want to use it.  Please help

    I want to bump this topic, again. So far the clues I've found are that there may be problems when the program was installed in one user account, and used in a different one. Perhaps there is a language setting, too. Can anyone give tips on this error for Mac, specifically Lion OS?

  • Error message, "Some of the application components are missing from the Application directory."

    I received the following error message: "Some of the application components are missing from the Application directory. Please reinstall the application. So, I uninstalled (Photoshop CS5), reinstalled and got the message again! Please help! I have no idea what I'm doing wrong.

    Nobody can tell you anything without proper system info or other technical details.
    Mylenium

  • I had photoshop installed fine.  We had to replace our hard drive, but had a full backup and everything else is working except for elements.  This is the message I get -Some of the application components are missing from the Application directory, Please

    I had photoshop installed fine.  We had to replace our hard drive, but had a full backup and everything else is working except for elements.  This is the message I get -Some of the application components are missing from the Application directory, Please reinstall the application.  I have reinstalled, but am getting the same message.

    A possible cause is a problem with the file places.sqlite that stores the bookmarks and the history.
    *http://kb.mozillazine.org/Bookmarks_history_and_toolbar_buttons_not_working_-_Firefox
    *https://support.mozilla.org/kb/Bookmarks+not+saved#w_fix-the-bookmarks-file
    You can also try to repair the places database with this extension:
    *https://addons.mozilla.org/firefox/addon/places-maintenance/

  • I have been using Elements11 for almost a year. I am suddenly getting the message:Some of the application componentsare missing from the application directory. Please reinstall. I deleted old version, reinstalled on my Mac and now get this message:A requi

    I have been using Elements11 for almost a year. I am suddenly getting the message:Some of the application components are missing from the application directory. Please reinstall. I deleted old version, reinstalled on my Mac and now get this message:A required application library failed to load and the product cannot continue. I also get the first message again. Organizer works but not editor. Frustrated!

    What a waste of space to paste the code.
    Why not ask in the iLife > iPhoto forum where your question belongs.

  • File from the Application server

    Hi gurus,
    I am working on a scenario where I need to get a file from the application server and for this I need to ask user to enter the location and that too at the selection screen and then I need to read this location using open data set and read data set in my program , once I am done with this I need to do some other validations. so can you please help me out how to achieve this.
    Thanks
    Rajeev Gupta

    Hi
    Declare the selection screen with file as parameter so that the user enter the application server file..
    the use the OPEND DATASET  as mentioned in below code and process
    Refer this:
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3ca6358411d1829f0000e829fbfe/frameset.htm
    ABAP code for uploading a TAB delimited file into an internal table. See code below for structures.
    *& Report  ZUPLOADTAB                                                  *                     &----
    *& Example of Uploading tab delimited file                             *
    REPORT  zuploadtab                    .
    PARAMETERS: p_infile  LIKE rlgrap-filename
                            OBLIGATORY DEFAULT  '/usr/sap/'..
    DATA: ld_file LIKE rlgrap-filename.
    *Internal tabe to store upload data
    TYPES: BEGIN OF t_record,
        name1 like pa0002-VORNA,
        name2 like pa0002-name2,
        age   type i,
        END OF t_record.
    DATA: it_record TYPE STANDARD TABLE OF t_record INITIAL SIZE 0,
          wa_record TYPE t_record.
    *Text version of data table
    TYPES: begin of t_uploadtxt,
      name1(10) type c,
      name2(15) type c,
      age(5)  type c,
    end of t_uploadtxt.
    DATA: wa_uploadtxt TYPE t_uploadtxt.
    *String value to data in initially.
    DATA: wa_string(255) type c.
    constants: con_tab TYPE x VALUE '09'.
    *If you have Unicode check active in program attributes then you will
    *need to declare constants as follows:
    *class cl_abap_char_utilities definition load.
    *constants:
       con_tab  type c value cl_abap_char_utilities=>HORIZONTAL_TAB.
    *START-OF-SELECTION
    START-OF-SELECTION.
    ld_file = p_infile.
    OPEN DATASET ld_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
    IF sy-subrc NE 0.
    ELSE.
      DO.
        CLEAR: wa_string, wa_uploadtxt.
        READ DATASET ld_file INTO wa_string.
        IF sy-subrc NE 0.
          EXIT.
        ELSE.
          SPLIT wa_string AT con_tab INTO wa_uploadtxt-name1
                                          wa_uploadtxt-name2
                                          wa_uploadtxt-age.
          MOVE-CORRESPONDING wa_uploadtxt TO wa_upload.
          APPEND wa_upload TO it_record.
        ENDIF.
      ENDDO.
      CLOSE DATASET ld_file.
    ENDIF.
    *END-OF-SELECTION
    END-OF-SELECTION.
    *!! Text data is now contained within the internal table IT_RECORD
    Display report data for illustration purposes
      loop at it_record into wa_record.
        write:/     sy-vline,
               (10) wa_record-name1, sy-vline,
               (10) wa_record-name2, sy-vline,
               (10) wa_record-age, sy-vline.
      endloop.
    Regards
    Anji

Maybe you are looking for

  • Decimal places in alternative unit of measure

    Dear Gurus, we have a material having two units of measure. Kg and meter. we have to define base unit as meter and alternative as kg. 1 m = 5.236 kg. But when i define this in alrenative UOM system gives error "Decimal places are not permitted" I kno

  • Monitor flickering

    There's a vertical line across the screen, and flickering horizontally. I tried connecting the monitor to different computers, and trying vga, dvi and hdmi cables. So it seems to be a problem with the actual screen I believe. It's not under warranty.

  • Report showing Invoices for a PO / Vendor

    I am looking for a SAP standard report which lists invoices(*) for a given Purchase Order or Vendor. (*) i.e. Invoice no generated by transaction MIRO. Thanks Phil.

  • How to route PO Approval Notification to Requestor instead of PO Preparer?

    Dear All, For PR Approval notification, it is possible to modify the workflow slightly so that the approval notification will be sent to the Requester instead of the Preparer. For PO Approval notification (PO Approved), is it possible to route the no

  • FI Archiving Error

    Dear SAP Gurus We are on version 4.7 in a post go live enviroment. When we run transaction SARA to archive our FI documents, we get a message "Period version not defined". We have maintained Account Life (t-code OBR7) & maintained Document Type life