0
How to compile and register a Java CFX tag with multiple class files?
Explorer
,
/t5/coldfusion-discussions/how-to-compile-and-register-a-java-cfx-tag-with-multiple-class-files/td-p/894765
Aug 11, 2008
Aug 11, 2008
Copy link to clipboard
Copied
All-
If this is the wrong forum for CFX questions, please let me know.
I need to determine how to compile and register a Java CFX tag that contains multiple class files. One class file implements the CustomTag interface and the other class files implement various supporting classes. All of the documentation that I have found talks about using a single class file. I am assuming that a JAR file will be involved, but I am not sure of the specifics.
Thanks in advance for your help.
-Josh
If this is the wrong forum for CFX questions, please let me know.
I need to determine how to compile and register a Java CFX tag that contains multiple class files. One class file implements the CustomTag interface and the other class files implement various supporting classes. All of the documentation that I have found talks about using a single class file. I am assuming that a JAR file will be involved, but I am not sure of the specifics.
Thanks in advance for your help.
-Josh
TOPICS
Advanced techniques
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Valorous Hero
,
/t5/coldfusion-discussions/how-to-compile-and-register-a-java-cfx-tag-with-multiple-class-files/m-p/894766#M82205
Aug 11, 2008
Aug 11, 2008
Copy link to clipboard
Copied
Yes, it will involve a jar. Use your java IDE (eclipse, etcetera ..) to create a jar containing all of the classes. Check your ide's documentation for how to create jar files. After you have created the jar, place the jar in the CF class path so CF will recognize it. For example the {cf_root}/WEB-INF/lib directory. CF must be restarted before it will detect the new jar. After restarting CF, register the CFX tag in the ColdFusion Administrator using the name of the class that implements the CustomTag interface.
Though it is worth noting you can also instantiate java classes directly from ColdFusion (ie without using a CFX tag).
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
jgolub
AUTHOR
Explorer
,
/t5/coldfusion-discussions/how-to-compile-and-register-a-java-cfx-tag-with-multiple-class-files/m-p/894767#M82206
Aug 11, 2008
Aug 11, 2008
Copy link to clipboard
Copied
Thank you for your prompt reply. This is exactly the
information I need.
Question: what are the pros/cons of providing (1) a CFX interface to Java-based functionality versus (2) a CFML interface (using direct Java class instantiation) to the same functionality?
-Josh
Question: what are the pros/cons of providing (1) a CFX interface to Java-based functionality versus (2) a CFML interface (using direct Java class instantiation) to the same functionality?
-Josh
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Engaged
,
/t5/coldfusion-discussions/how-to-compile-and-register-a-java-cfx-tag-with-multiple-class-files/m-p/894768#M82207
Aug 11, 2008
Aug 11, 2008
Copy link to clipboard
Copied
By calling Java direct you get much more control and can have
Java Objects. Whereas with CFX you can really just utilise a Java
Library that can do really defined tasks for you without getting
the most out of the language.
As for Pros of CFX, the only real one that I can think of is that you are going to have more joy getting it deployed in a shared hosting as pretty much all of them are going to turn you down.
To summarise I have access to my own server so I only use Java Direct I haven't used CFX for about 4 years.
As for Pros of CFX, the only real one that I can think of is that you are going to have more joy getting it deployed in a shared hosting as pretty much all of them are going to turn you down.
To summarise I have access to my own server so I only use Java Direct I haven't used CFX for about 4 years.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
jgolub
AUTHOR
Explorer
,
/t5/coldfusion-discussions/how-to-compile-and-register-a-java-cfx-tag-with-multiple-class-files/m-p/894769#M82208
Aug 11, 2008
Aug 11, 2008
Copy link to clipboard
Copied
quote:
Originally posted by: Stressed_Simon
As for Pros of CFX, the only real one that I can think of is that you are going to have more joy getting it deployed in a shared hosting as pretty much all of them are going to turn you down.
In this case, the CFX or CFML wrapper would be invoking Java classes provided by me. Are Java classes easier to deploy in a shared environment than a CFX would be?
-Josh
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Engaged
,
LATEST
/t5/coldfusion-discussions/how-to-compile-and-register-a-java-cfx-tag-with-multiple-class-files/m-p/894770#M82209
Aug 11, 2008
Aug 11, 2008
Copy link to clipboard
Copied
Neither is easier it is just that you are more likely to
persuade a host to let you deploy CFX tags in a shared environment
than Java classes in the classpath. I am not sure but I think it is
easier for them to restrict them with Sandbox Security.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

