Skip to main content
Participating Frequently
October 4, 2010
Question

Custom tags in CF9

  • October 4, 2010
  • 2 replies
  • 2059 views

I have over 200 custom java tags.  In our CF7 environment I manually registered the 200+ tags; and then I copied the neo-runtime.xml file to 2 other CF7 server installations.  We are now looking at upgrading to CF9.  I have installed the development version and want to know if there is a way I can get my custom tags recognized without having to manually register each one of them.  I tried copying the neo-runtime.xml file but that didn't work so I restored the original neo-runtime.xml.  And now, for some unexplainable reason, some of my custom tags are working even though they are not registered anywhere; and others are not working.  Not sure what is happening.  Obviously, CF9 handles custom tags differently but I can't find any documentation on this.  Can anyone explain or assist.

Thanks.

    This topic has been closed for replies.

    2 replies

    Charlie Arehart
    Community Expert
    Community Expert
    October 5, 2010

    Nosredna, here's a possible explanation why some work for you and some do not. When "registering" the java CFXs, have you noticed that you don't specify their location? That's because they're expected to be found in places that CF can find them, as defined by the classpath configured for CF, which includes a couple of default locations: in the WEB-INF/classes directory if .class files, or in the WEB-INF/lib for .jar files.

    Also, you can tell CF to find them in other locations, by modifying the classpath, either in the CF Admin (Java and JVM page) or in the jvm.config.

    I wonder if the ones that are working for you are found in the default locations, and the ones that are not are in locations that either weren't brought forward and specified in the classpath for your upgraded server, or perhaps the paths are there but not correct (if this is a new server).

    Much of this is discussed in the CF docs, such as a series of pages starting here:

    for CF8: http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=CFXTags_4.html.

    for CF9 (same text): http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSc3ff6d0ea77859461172e0811cbec0a4b8-7ffb.html

    You say that "Obviously, CF9 handles custom tags differently but I can't find any documentation on this". I'm really not aware of any changes in this regard, since CF 6.

    As for not finding any docs, if you mean about a change in CF9, well, there isn't any as far as I know, not since CF4.51 when Java CFXs were introduced (though the default locations for classes and lib did change as of CF 6.)

    If you may have meant that you could find no docs on registering CFXs at all, well, a common problem is that people tend to focus solely on the CFML Reference. The doc I point to above is in the Developer's Guide. There is also an Admin and Config Guide:

    for CF8: http://livedocs.adobe.com/coldfusion/8/htmldocs/Part_2_Config_Admin_1.html

    for CF9: http://help.adobe.com/en_US/ColdFusion/9.0/Admin/index.html

    Though that really doesn't offer much on CFXs. Instead, it points readers to the online help, which again people often miss. This is referring to the help icon within the CF Admin. And that page (called from the CFX page) does indeed offer information on registering CFXs and these paths in which to place them, or the need to modify the classpath.

    Hope that helps.

    /charlie arehart

    charlie@carehart.org

    Providing CF and CFBuilder troubleshooting services

    at http://www.carehart.org/consulting

    /Charlie (troubleshooter, carehart. org)
    nosrednaAuthor
    Participating Frequently
    October 6, 2010

    Charlie:

    Thanks for the response. I suspected that CF9 might be "automatically" recognizing my custom tags from my custom .jar file and custom tag path that I had set up in CF Admin. The odd thing is that "all" of my custom tags are defined in my.jar file and, as mentioned, some of them were recognized and some of them were not. It was that inconsistency thatI found to be bizarre. For the ones that were not, I had to manually register them in CF Admin.

    I'm wondering if anyone else has had similar experiences that they could relay.

    Thanks...

    Charlie Arehart
    Community Expert
    Community Expert
    October 6, 2010

    That is odd. You're saying that all Java CFXs are in one jar, and that Jar is in the classpath?

    Even so, it would seem odd that only some would work without registering. Here's a thought: are some in java packages, and others not? Perhaps that has an effect.

    /charlie

    /Charlie (troubleshooter, carehart. org)
    October 5, 2010

    If you are using CF enterprise license , in CF administrator, there is a option of building CAR file. You can use this to migrate your CFX tag from CF 7 to 9.

    If you using CF standard, then make it in developer edition and then this option will come in CF admin

    nosrednaAuthor
    Participating Frequently
    October 6, 2010

    In some of the research I've done it has been suggested that a CAR file is good if you are going from one server to another using the same version of CF; but if you are going from one version of CF to another, then it is not a great idea.

    Can anyone else confirm that a CAR file will work when going from CF7 to CF9?

    Thanks...