Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Could not find the ColdFusion Component Components.Users

Posted on 2005-05-12
20
Medium Priority
?
548 Views
Last Modified: 2013-12-24
I'm trying to invoke a Component, but CF can't find it?

I have directory name Secure and then a directory named Components. A cfm file in the secure directory finds it with no problem.

I have a subdirectory named PriceList and a cfm file in this directory. This file can not find the component.

What can I do?

0
Comment
Question by:JRockFL
  • 10
  • 9
20 Comments
 
LVL 11

Accepted Solution

by:
adonis1976 earned 2000 total points
ID: 13987889
when u call the component in the PriceList directory, do this

<cfset myObject = CreateObject("component","secure.components.component_name")>
0
 
LVL 8

Author Comment

by:JRockFL
ID: 13987976
I tried it that way and still get the same error message.
0
 
LVL 35

Expert Comment

by:mrichmon
ID: 13988325
Have you registered it in teh cfadmin and also tried setting the alternate path to look for compnents (or maybe that is for tags only?)
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
LVL 8

Author Comment

by:JRockFL
ID: 13988648
i have not registered the cfcs before and they worked. are you suppose to register the cfcs? i thought it was for just tags
0
 
LVL 11

Expert Comment

by:adonis1976
ID: 13988713
no u don't need to register cfcs..

is this ur directory structure?

secure -- some files inside.
 |
  --- Components --- cfc files
 |
  ---Pricelist -- Some .cfm files

???
0
 
LVL 11

Expert Comment

by:adonis1976
ID: 13988765
why dont you do this?

store a variable in the application scope as follows

<cfset application.components = "Fully qualified path to component directory"> you can also use expandPath () if you are using relative path.

now in the call:

try this:

<cfset myObject = CreateObject("component","#application.components#.component_name")>
0
 
LVL 8

Author Comment

by:JRockFL
ID: 13988927
Yes, that is the correct directory structure

i tried your next suggestion and still getting the same error....
0
 
LVL 8

Author Comment

by:JRockFL
ID: 13989076
It should work, I have done this before on my home web server and it works fine. I dont know what to do now!
0
 
LVL 11

Expert Comment

by:adonis1976
ID: 13989283
paste the code where you are calling the component.. and also i want to see ur Application.cfm where you have implemented my earlier idea..
0
 
LVL 8

Author Comment

by:JRockFL
ID: 13989348
Here it is...

<!--- Application --->
<cfset application.components = "\\webserver\Internet\rock\Secure\Components">

<--- Calling Page --->
<cfset myObject = CreateObject("component","#application.components#.Users")>
0
 
LVL 11

Expert Comment

by:adonis1976
ID: 13989603
\\webserver\Internet\rock\Secure\Components is not a fully qualified path.. use this..

<cfset application.components = expandpath('components\')>
0
 
LVL 8

Author Comment

by:JRockFL
ID: 13989704
This is what I have in the application page
<cfset application.components = expandpath('components\')>

This is on the calling page
<cfset myObject = CreateObject("component","#application.components#.Users")>

This is  the error I get
The filename, directory name, or volume label syntax is incorrect

If I output
<cfoutput>#application.components#</cfoutput><cfabort>
It shows this D:\InetPub\Internet\rock\Secure\PriceBooks\components\

My components directory is here
D:\InetPub\Internet\rock\Secure\Components
0
 
LVL 11

Expert Comment

by:adonis1976
ID: 13989858
lets do this way and see what happens

Let declare few more application variables:

<cfset application.home = "D:\Inetpub">
<cfset application.components = "#application.home#"\internet\rock\secure\components">

and call as

<cfset myObject = CreateObject("component","#application.components#.Users")>
0
 
LVL 11

Expert Comment

by:adonis1976
ID: 13989872
and here is a place to learn more about expandPath

http://www.efflare.com/docs/CFX_ImageCR3/reference/advanced/tips.html
0
 
LVL 8

Author Comment

by:JRockFL
ID: 13989937
application.components displays as D:\Inetpub\internet\spence\secure\components (which is the correct spot)

But I still get this error message...
The filename, directory name, or volume label syntax is incorrect
0
 
LVL 8

Author Comment

by:JRockFL
ID: 13989961
I mean D:\Inetpub\internet\rock\secure\components (which is the correct spot)
0
 
LVL 11

Expert Comment

by:adonis1976
ID: 13990362
have you tried forward /? i don't know if they will make a difference.. it will on UNIX..
0
 
LVL 8

Author Comment

by:JRockFL
ID: 13990425
im on windows...
0
 
LVL 11

Expert Comment

by:adonis1976
ID: 13990516
did u try forward / in setting the application variable.. just in case.
0
 
LVL 8

Author Comment

by:JRockFL
ID: 13990588
yes, i have tried just about everything. it should of worked.
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When setting up new project requests for our site, one of the most powerful tools our team has available to use is Axure (http://www.axure.com/). It’s a tool for creating software and web prototypes that can function and interact as if it were the a…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
The purpose of this video is to demonstrate how to insert an Iframe into WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Open Page or Post…
The purpose of this video is to demonstrate how to reset a WordPress password if you are locked out and cannot reset the password. A typical use would be if you cannot access the email to which WordPress would send the password recovery email to…

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question