Skip to main content
Participant
November 24, 2009
Answered

CFAjaxProxy Error

  • November 24, 2009
  • 1 reply
  • 1548 views

Hi guys.

I'm getting started with some ajax functions. so i had to look at cfajaxproxy.

It look as it is very cool function but i don't get it work.

I've got a directory with two files in it. cfAjaxProxy.cfm and proxy.cfc on the toplevel. There's no Application.cfc or something...

so i'm calling the proxy.cfc with

<cfajaxproxy cfc="proxy" jsclassname="proxy" />

but then appears an error

The specified CFC proxy could not be found.

The path to the CFC must be specified as a full path, or as a relative path from the current template, without the use of mappings.
The error occurred in D:\www2\cfajaxproxy\cfAjaxProxy.cfm: line 1
1 : <cfajaxproxy cfc="proxy" jsclassname="proxy" />
2 : 
3 : <script>

I'm now on CF9.

I've googled around and read the reference a few times...

Sorry for my bad english...

regards.

Maertsch

    This topic has been closed for replies.
    Correct answer Adam Cameron.

    OK, so I notice the CFC is here: D:\www2\cfajaxproxy\proxy.cfc

    But you said it was in your webroot ("top level") earlier.  I suspect your webroot is D:\www2\, and the URL you browsed to your CFC is along the lines of http://localhost/cfajaxproxy/proxy.cfc ?

    If so, the dotted path to your proxy.cfc in your <cfajaxproxy> tag needs to be "cfajaxproxy.proxy".  That dotted path gets converted to a URL in the underlying Javascript, so it has to be the fully-pathed URL to the CFC.  I think the docs claim it can be relative, but I seem to recall that not working for me (I could be wrong).  Give it the full path, "cfajaxproxy.proxy".

    --

    Adam

    1 reply

    Inspiring
    November 24, 2009

    Your English sounds fine to me!

    What happens when you browse to the CFC?  Can you?

    --

    Adam

    MaertschAuthor
    Participant
    November 24, 2009

    Hi, thanks for your reply.. i'll give my best.

    i called proxy.cfc by the URL.

    proxy

    Component proxy


    hierarchy:WEB-INF.cftags.component
          proxy
    path:D:\www2\cfajaxproxy\proxy.cfc
    serializable:Yes
    properties:
    methods:reverseString, serverTime

    So seems that everything works fine. you see the path is also correct (same directory).

    Is this a problem with some mappings... I'm running on default Administrator setting and haven't mapped anything.

    Inspiring
    November 24, 2009

    Hi,

    Try to create a mapping for that CFC, and pass it to the cfc attrbute of your <cfajaxproxy> tag.