This step-by-step uses CFX_Excel2Query as an example tag.
These steps apply to all CFX tags, simply replace
"cfx_excel2query" with the name of the tag. And, as always, be sure to always read any accompanying README file or other documentation for additional instructions
and modify the installation procedure accordingly. All illustrations below are of ColdFusion MX. Instructions ColdFusion 4.5+
can be derived from the below instructions with little effort.
If you get stuck even after using this step-by-step, i cannot help you. Please consult Google.
|
| Step 1 - Copy file to server |
Copy the CFX file to your server in the directory of your choosing.
For organization's sake, I usually choose a subdirectory of the ColdFusion
installation, which is C:\CFusionMX for ColdFusion MX and C:\CFUSION for ColdFusion 4.5+ (by default).
Figure 1 shows cfx_Excel2Query.jar in the directory C:\CFusionMX\CFX_Tags\cfx_excel2query\. Note that
the directory CFX_Tags\ and cfx_excel2query\ are both user-created. Again, this is just an arbitrary location
on the filesystem.
|
|
| Step 2 - Java/JVM Settings |
You must now tell ColdFusion the location of the .jar file. If you do not have a .jar file (but instead you have .class file)
you would specify the directory that the .class file is located. In the case of .jar files, the .jar file
acts as a directory (so to speak).
First you must log into your ColdFusion administrator. By default, the location is http://yourwebserver/cfide/administrator.
If you cannot access the ColdFusion administrator with this URL, contact your webserver administrator. If you are
the webserver administrator, and you don't know the URL, well.. shame on you.
ColdFusion MX:
After logging into the administrator, under "SERVER SETTINGS" click on "Java and JVM" (as illustrated in Figure 2). Under "Class Path" enter
the full path to the .jar file (or the full path to the directory holding the .class file). If there is already
something in this box, separate your new entry from the existing entry with a comma.
ColdFusion 4.5-5.0:
After logging into the administrator, under "Extensions" click on "JVM and Java Settings". Under "Class Path" enter
the full path to the .jar file (or the full path to the directory holding the .class file). If there is already
something in this box, separate your new entry from the existing entry with a semi-colon (or colon if it is Linux/Unix).
When done, click "Submit Changes". You may be prompted to restart ColdFusion. You need not do that yet.
|
|
| Step 3 - Register the CFX |
In the administrator, click on "CFX Tags" in the side navigation. After that, click on "Register Java CFX" (Figure 3).
/
After clicking "Register Java CFX", you will be presented with three input fields: Tag Name, Class Name and Description.
"Tag Name" is how you are going to reference the CFX tag in your code. This has to start with cfx_ and is not case sensitive.
You can give the CFX tag any name you wish, but it's generally best to stick with the name of the .jar/.class file.
The "Class Name" is the most important. It is CASE SENSITIVE, so you must enter the name exactly as
it appears on the filesystem; matching letter-for-letter the name of the tag.
So as Figure 1 shows, our Class Name must be cfx_Excel2Query. Do not add the extension!
(i.e. cfx_Excel2Query.jar is wrong and will not work!)
The description is optional and can be anything you like.
When you are finished click "Submit Changes".
|
|
| Step 4 - Restart ColdFusion |
This is a very important step. When you are all finished making the above changes, you must restart
ColdFusion. If you don't, ColdFusion will display some goofy messages like "CFX_cfx_Excel2Query not found".
Figure 5 shows the restart process. If you don't know how to restart CF, it's time to learn. On a windows platform
you will open up the Services MMC and locate "ColdFusion MX Application Server" or just "ColdFusion Application Server" for 4.5+ (i think).
Once you've found it, click on it and click the restart button at the top of the MMC (or right click and click "Restart").
In the Unix world, the restart mechanism varies. It's usually something like /etc/init.d/coldfusion restart or
something similar.
|
|
| Step 5 - Use the tag |
|
Now you can use the tag. Follow the usage instructions for the given tag for more details.
|