Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

application.cfc and invoking by url a cfc

New Here ,
Mar 26, 2008 Mar 26, 2008
hi all!

i have to invoke by url a cfc. like this... http://domain/cfcByUrl.cfc?method=get

now, if i add application.cfc to root of my application, my cfc invoked by url not works! it return only a white page!

what happen? where do i wrong?

cfmx7.0.2 on linux

thanks
Rob
622
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 27, 2008 Mar 27, 2008
Hi

You have to call the CFC's through the URL by passing the function and its arguments

For eg: cfcByURL.cfc?method=getList&id=1

Method = your function name in the CFC
id= your parameter in your function in cfc if you have more that one parameter you have to specify all parameters seprated with '&'

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 27, 2008 Mar 27, 2008
vkr, thanks for your reply

quote:

You have to call the CFC's through the URL by passing the function and its arguments


yes, it is.

quote:

You have to set your function access type to remote


yes, it is.


i make some testing.

if i remove onRequest method in my application.cfc my cfc called by url works perfectly. but, i think, is not a good choice remove onRequest... :o) this is mine...

<cffunction name="onRequest" output="Yes">
<cfargument name="targetPage" type="string" required="yes" />
<cfinclude template="#arguments.targetPage#" />
</cffunction>

i test this situation on linux and windows. i've the same problem.

thank
Rob
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 27, 2008 Mar 27, 2008
LATEST
doh! :-(

http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=AppEvents_08.html

<<Do not implement the onRequest method in any Application.cfc file that affects .cfc files that implement web services, process Flash Remoting or event gateway requests; ColdFusion will not execute the requests if you implement this method.>>
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 27, 2008 Mar 27, 2008
Hi

You have to set your function access type to remote

Then only you can achive this
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources