cfc location variable

Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.

  1. #1

    Default cfc location variable

    My client site uses CFC extensivly and they are all held above the wwwroot
    level to allow webservices to access them. So the directory strucutre looks
    something like this

    db
    extensions(dataobjs / UBR / WS)
    logs
    wwwroot

    I need a way to call the cfcs (under dataobjs/ubr) from within the wwroot
    level and I need to put the cfcslocation into a global varibale to use within
    the whole site i.e

    <cfscript>
    tp = CreateObject("java", "coldfusion.runtime.TemplateProxyFactory");
    tp = tp.resolvePath("**relative path here**", getPageContext());
    </cfscript>

    <cfset CFCsLocation = #tp#>

    <cfscript>
    request.CFCsLocation = "#CFCsLocation#";
    </cfscript>

    so that I can then call a cfc thus

    <cfparam name="Request.cfcs.utils" default="#createObject('component',
    '#request.CFCsLocation#.utils')#">

    But it doesn't quite work - does anyone else do this kind of thing and how?
    Any other ideas?

    Cheers

    Paul

    kabod Guest

  2. Similar Questions and Discussions

    1. #39251 [NEW]: variable variable class array property is read only
      From: taskfreak at gmail dot com Operating system: mac os PHP version: 5.1.6 PHP Bug Type: Class/Object related Bug...
    2. Error: That location is controlled by another site.Please choose another location
      Hi, I was wondering if anybody came across this error before: "That location is controlled by another site. Please choose another location" I am...
    3. #22237 [Com]: PHP crashes when class references property using variable variable
      ID: 22237 Comment by: rep at devdomain dot com Reported By: peter at globalvision dot com dot au Status: Closed...
    4. movie location changing when there's nothing changing its location
      I have a cross-platform program (each half using a different engine (quicktime for mac and MPEG Advance for pc). On both sides and on most computers...
    5. Datalist - how (if) to use a sub variable or session variable in the footer?
      Hi, sorry to be greedy with all my posts lately, but can you tell I'm doing new things this week? I've just done my first datalist (a simple...
  3. #2

    Default Re: cfc location variable

    Hi

    I think by adding the path of the CFC's we can use the names of the .CFC directly in the application.
    i am using like that only in my application.
    vkunirs Guest

  4. #3

    Default Re: cfc location variable

    How do I get a domain name in it though? Cozz CFCs use dot notation how do you put domain.co.uk in the path?
    kabod Guest

  5. #4

    Default Re: cfc location variable

    Why would you use the domain name in the notation if you are calling the
    component from within a CF page? You just need the directory structure if it
    is witin your web root and just the component name if its within the Custom
    Tags directory.

    TA-Selene Guest

  6. #5

    Default Re: cfc location variable

    but the cfcs are in the same level as wwwroot not under wwwroot
    kabod Guest

  7. #6

    Default Re: cfc location variable

    In order to get CF to find the component, you'll need to create a ColdFusion
    mapping to the directory in which the components are stored. The only
    directory outside of the web root that CF can find without a mapping is the
    Custom Tags directory.

    TA-Selene Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139