Invoking a CFC in another directory

If, off the main root, I have a folder called components and
I put all the
site CFCs in there. How to I invoke them from the main root
and from another
folder (root/news for example)
Wally Kolcz
Developer / Support

Wally, you can also specify the location of the component
using dot notation
For example, if you have a component called calculator in the
components directory you could use <cfobject> to invoke it
like so:
<cfobject name="cfcCalculator"
component="components.calculator">
You can nest folders as deep as you want and the last part of
the component attribute will always be the component name, minus
the .cfc extension.

Similar Messages

  • Copy file from directory to another directory

    I need to copy a file from a directory to another directory, but that file is longer than 2M.
    I put the data into a array of bytes and then i passed to a destination directory.
    Now i'm using a BufferedOutputStream but, as i have a file whith 2M, and this dont work.
    How can i resolve this problem.
    Thanks, Luis

    I use This, and it works with all kinds of files. I use it for backups with thousands of files and subdirectories.
    you can use this like "copyFiles("D:\\Source", "D:\\Destination")
    The two directories in the parameter list must exist. Subdirectories will be generated from the method.
    I hope this will help you.
    private void copyFiles(String fromPath, String toPath)
         // copies all files and it�s subdirectories from fromPath to toPath
         // fromPath and toPath must exist
              if (fromPath != null)
                   File dir = new File(fromPath);
                   if (dir.exists() && dir.isDirectory())
                        File [] fileList = dir.listFiles();
                        int count = fileList.length;
                        int i = 0;
                        while (i < count)
                             File f = fileList;
                             i++;
                             if (f.isFile())
                                  String toFile = toPath + File.separator + f.getName();
                                  copyFile(f.getPath(), toFile);
                             else
                                  if (f.isDirectory())
                                       File newPath = new File(toPath + File.separator + f.getName());
                                       newPath.mkdirs();
                                       copyFiles(f.getPath(), newPath.getPath());
                        }// while (i < count
                   }// if (dir.exists() && dir.isDirectory())
              }// if (fromPath != null)
         }// copyFiles(String fromPath, String toPath)
    private void copyFile(String src, String dest)
    // Copies a single File with date and time attributes
              long fileTime;
              try
                   FileChannel in = new FileInputStream(src).getChannel();
                   FileChannel out = new FileOutputStream(dest).getChannel();
                   File inInfo = new File(src);
                   fileTime = inInfo.lastModified();
                   in.transferTo(0, in.size(), out);
                   in.close();
                   out.close();
                   File outInfo = new File(dest);
                   outInfo.setLastModified(fileTime);
              } catch (IOException ioe)
                   System.out.println("An error occured: " + ioe.getMessage());

  • Retreiving the file names from directory inside another directory from application server

    Hi,
    I had a problem in retreiving the file names from a directory inside another directory.
    I tried using the FM's  SUBST_GET_FILE_LIST, RZL_READ_DIR_LOCAL and EPS_GET_DIRECTORY_LISTING
    But here I am getting only one directory details.
    Actually my file is located a directory inside one more directory and one more directory and inside the files are located.
    i.e total 3 directories inside the 3rd one my files are there.
    I need to read the latest file name in the directory.
    So that i can do some manipulation after getting the file name.
    Is there option like OPEN DATASET , READ DATASET and CLOSE DATASET?
    Can anyone please let me know How can i acheive this one.
    Regards
    Ram

    Hi Ram,
        Following thread can be helpful for you, were it shows in the tables structure rsfillst a field RSFILLST-TYPE whether its a directory or file..........
    http://scn.sap.com/thread/865272
    thanks and regards,
    narayan

  • How to  move a page file to another directory ?

    Hi,
    What I did to try to move a page to another directory is:
    1. copy the page file to another directory /public_html/mydirectory.
    2. modify the nevigation-rule in the faces-config.xml file so that the nevigation-rule
    point to the file in the new directory.
    But when run the page, there is an FacesException: Cannt instantiate backing_bean.
    How to move a page file to another directory?
    Thanks
    Stephen

    besides moving the file to the new directory, i'd advise you to find the name of your page in every file of your application (ultraedit does this very well) and append the directory wherever it appears otherwise you'd probably miss a reference and have a problem like you have.

  • Problem in invoking a servlet from another PC

    hi
    i am trying to invoke a servlet running on apache tomcat 5.0.28 from another PC, my j2me wireless toolkit is on one PC and it runs a MIDlet that invokes a servlet on another PC, but am getting an exception connectionNotFound....
    both the computers are on LAN, what do i do?
    Need guidance

    No, i think tomcat server is enough.. have u checked your servlet from browser?
    I got the same error in black berry application and at that time i found that its due to servlet config in web.xml
    Have u configured your servlet in web.xml?
    One suggestion.. change your URL to www.google.com and then run your MIDlet.. it confermed that your midlet is OK
    Http request is fine to send data from your WTK.
    About apache http "NO IDEA"
    Thks

  • How to duplicate a file in a directory to another directory?

    I am a student just has just learn some basic Java programming...May i know how to duplicate a file in a directory to another directory?
    How to start in doing this?
    Thank You

    I was suggesting to use java to send commands to the system shell so to speak....
    I don't know of a way to do this... under the File class you can delete files, but there is no provision to copy Files so to speak....
    one way would to be to open the file you want to copy with a file reader, and then write it all out to your new file.
    see http://java.sun.com/j2se/1.3/docs/api/java/io/FileReader.html for information of FileReaders

  • Different ways to invoke a servlet from another servlets?

    Hello,
    I am a bit confused today. I was thinking about all the ways by which I can invoke a servlet from another servlets. I know it can be done by creating an instance of the 2nd servlet in the 1st one. Is there any other way? such as say.... RequestDispatcher perhaps?
    Here is an example to illustrate my point. I have a login.jsp which submits to login.do. login.do search through database and first authenticate email and then the corresponding password. Now its time for displayGame.do. So here how do i do? if it was a displayGame.jsp then i could have used Redirection or Forward but when it is servlets? Can I still go for Redirection or Forward??
    Thank you for reading this confused post. :-)

    if it was a displayGame.jsp then i could have used Redirection or Forward but when it is servlets?Question: do you know what a JSP becomes when you first run it?
    Answer: a servlet.
    So yes, you can use a RequestDispatcher to forward/redirect to a servlet OR a JSP, whatever you like.

  • Missing fonts when saving in another directory

    I made a page (the index), put a web font, the css and font is saved in a directory and is ok, the page looks perfect in browser, now i save the same page with another name in another directory and dreamweaver ask me "Do you want to update the links?" I click "yes" and now the new saved page dont display the fonts, if i save in the same directory that the original yes but if saved in a subfolder dont display fonts. Why, the css has the link and route to the fonts, what am i doing wrong???!!!

    Hi
    Check the css file that is created for the web fonts, as this may be using a relative link to the web font files.
    Without seeing the code that is only a guess, can you upload the page, (and all files) to a web server for us to check?
    PZ

  • Can the FrontendCallback.seq be located in another directory?

    Hi,
    The normal location for the (customized)FrontendCallback.seq is \Components\User\Callbacks\FrontEnd. If you want to make a modification and place it in another directory, how you configure TestStand to look at this modified FrontendCallback.seq (i.e. not the default user directory)?
    Thanks...Kevin

    Hello Kevin,
    Unfortunately you cannot change the location of the FrontEnd callback sequence. TestStand searches automatically for this sequence first in \Components\User\Callbacks\FrontEnd and if not found it searches at \Components\NI\Callbacks\FrontEnd.
    Regards,
    Roberto Piacentini
    Applications Engineer
    National Instruments
    www.ni.com/ask

  • How to invoke BPMN processes in another project in JDeveloper?

    I have imported two BPMN diagrams from the Oracle BPA to JDeveloper. After importing I ended up with two projects each containing the first and second diagram. The problem now is in the final product, the user should be able to go through the tasks and other stuff in the first diagram and proceed to go through the task and other stuff in the second diagram.
    JDeveloper only allows me do this if the two BPMN diagrams are in the same project. By doing so I can use the throw message events in the first diagram to invoke the second diagram using the second diagram's message catch event.
    I can manually copy the second diagram to the first project but when I have 100+ diagrams I will have a big problem.
    Anyone know how can one BPMN diagram in one project invoke a diagram in another project?

    Know this is cryptic - if you want a step-by-step I'll be glad to give you more details.
    Add a Message start event to the process that you want to make the called child process. Deploy the project and copy the WSDL of the new process that is now exposed as a web service using Enterprise Manager.
    In the calling parent process, open the composite and add the service. In the calling process, add a Service activity that invokes the web service you just exposed.
    Hope this gets you going,
    Dan

  • I repet : I can't install Firefox in another directory that C. I am not allowed by Firefox 3.6.10 to write another directory than C\downloads or another but started with C:\.

    I repet : I am not allowed to write another directory than C:\\ when I direct Firefox fon installing.
    I want to post Firefox in G:\\, where I have enought space. In C:\\ I just have space for Windows .

    Please stick with your original thread. Locking this one as a duplicate.
    https://support.mozilla.com/en-US/questions/754307

  • Invoke a from from another form

    Hi,
    Is it possible to invoke a form from another form. For example, based on a radio button choice or in button click event, i just need to show another form, but not in seperate window. We tried using app.launchURL(form workspace url). However it doesnt work in desired way.
    Please help if you have any idea on this.
    Regards,
    Sudha

    Sudha....
    the technical aspect you want to prove is calling another webpage...
    What is at the end of the webpage is irrelevant....
    your test code is:
      xfa.host.gotoURL(www.google.co.za);
    you work code is:
    xfa.host.gotoURL(http://someserver/pdfs/mypdf.pdf);
    have fun...
    8 BIT PLATOON
    design develop deploy
    www.8bitplatoon.com

  • Invoke a presentation from another presentation

    Hi everybody,
    I need to invoke a presentation from another presentation, to generate an e-mail, like a popup. I would prefer not to use another task to do this. In the parent presentation i need a button Mail that invokes a presentation in which i would have some attributes from the parent presentation. Please your help.
    Thanks
    Eva
    Edited by: Eva E on 22-jul-2009 11:06

    Hi Eva,
    Know there's a good reason for you not using a Screenflow for this, but I missed it somehow.
    If you had a Screenflow, you could have a transition in the screenflow back to the original presentation and retain the information you entered/changed in the original presentation.
    Thanks,
    Dan

  • Problems when I copy my VI to another directory

    Hello!
    I have problem when I copy my Main Vi to another directory. It is included in the program to have a template main that I duplicate. When I have copied my Vi to another directory direct under the template directory it has problems to find subvi´s that are included in the main VI. The subvi´s are included in the same folder as the template VI. Is it possible to set in the template main VI where to look for the subvi included, independent where I copy it?
    Please help!!
    BR
    Kristian

    Sure. There is a file path "constant" that will return the current VI's path. Use this, then strip off what you don't need with strip path and add in the new parts with build path.
    Hope that this helps,
    Bob
    Bob Young - Test Engineer - Lapsed Certified LabVIEW Developer
    DISTek Integration, Inc. - NI Alliance Member
    mailto:[email protected]

  • Can't play music since I moved it to another directory

    Is there a possibility to let Itunes search for all the right directories for all my music at once, or do I really have to search it manually for each song? Since I moved my music to another directory, Itunes isn't able to detect it anymore.

    No iTunes does not automatically search for missing tracks.
    The simplest way out of this is to start a new library, but this will loose all your counts rating and playlists.
    To do this, close iTunes and drag iTunes Library.itl and iTunes Library.xml to the desktop.
    Open iTunes and and empty library is created. Set the location of your iTunes Music folder if you need to (preferences>>Advanced tab) then add you new music folder with File>>Add folder to library.
    If you really care about your meta data there is another way which is more complicated and involves editing the xml file to correct the paths. I can explain how to do that if you want. It only works if you moved the entire iTunes Music folder intact so all the subfolders remain the same.
    PS there is another alternative, if you can put everything back how it was before you moved the music folder.
    Message was edited by: polydorus

Maybe you are looking for

  • Boot Seagate Expansion Desktop Drive (2Tb) on HP ProBook 6570b

    Hello All! I currently bought a Seagate Expansion Desktop Drive (2Tb) and tried to make it a bootable drive so if I go to work and back to use it (Windows to go). On my desktop computer the drive works perfectly, boots and everything is fine, but on

  • Windows 7 64 bit drivers for HP ENVY 17-j002er

    Hello, i am having trouble finding the appropriate drivers for OS. Could you please help me? Thank you in advance. This question was solved. View Solution.

  • How do I tell the CC application manager that Lightroom is not installed on my pc?

    Before i got CC i was using Lightroom 5 swedish version for evaluation. I used application manager to install an English version by setting the language to English but language after CC installation of Lightroom is still Swedish. Checking the languag

  • Issues exporting out of lightroom 4

    I've recently encounterd a problem while trying to export images out of Lightroom 4.  I keep getting an error messge "File canot be written."  This is happening whether I'm exporting a Jpeg or a raw file.   Cannot figure what has happend but it's doi

  • [SOLVED]flash repo no sound

    I can not seem to get sound to work with flash, video plays fine. I have searched the forums for a fix and I have not come across one that has worked. Sound does work with Amarok. Any help would be greatly appreciated!!! 2.6.27-ARCH ESS Technology ES