Question : components being called issue!

i have a folder named ADMIN and a folder named COMPONENTS

now my Application.cfc which is inside the admin folder, i am calling the CFC as: Please note COMPONENTS Folder is outside the ADMIN Folder

So abc is the CFC inside the components folder:


<cfset a = CreateObject("component","components.abc")>

now i run a page i poften get two kinds of eror:

1. coldfusion compoenet or instance not found!
2. Element ABC is undefined in a Java object of type class [Ljava.lang.String; referenced as

Please guide!

Answer : components being called issue!

> C:/wwwroot/myname.com/components/abc.cfc
                                  ^^^

Here is your problem.  You have a "." in the name of your folder.

CreateObject() uses the dot instead of a / to determine the folder levels.

So create object thinks your path is this:

   /myname/com/components/abc.cfc

when in fact your path is this...

  /myname.com/components/abc.cfc


** You can resolve the issue by changing the name of the folder so it does not have the dot in the name


> it shows nothing means nothing

Not possible.   You probably just don't have it displaying somehow.
You could add some text around it like this, that way you know if you are seeing it or not...

 <h1><cfoutput>ROOT PATH IS #ExpandPath("/")#</cfoutput></h1>


Random Solutions  
 
programming4us programming4us