|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
CFX Tag
Hello ,
I try to run an example of CFX, but i'm not a Coldfusion specialist !!! So : 1) I wrote this code : Code:
<!DOCTYPE HTML etc ...> <html><head><title>Untitled</title></head><body> <cfx_Hello NAME="OPHELIE"> </body></html> 2) I wrote this java code : Hello.java : Code:
import com.allaire.cfx.*;
public class Hello implements CustomTag
{
public void processRequest( Request request, Response response ) throws Exception
{ String strName = request.getAttribute( "NAME" ) ;
response.write( "Hello, " + strName ) ;
}}
3) I registered my CFX in CF administration page : http://localhost:8500/CFIDE/administrator/index.cfm / "CFX Tags / Registered CFX Tags" +--------+-----------+------+-------------+ |Actions.|.Tag.Name..|.Type.|.Description.| +--------+-----------+------+-------------+ |........|.CFX_Hello.|.java.|.Exemple.01..| +--------+-----------+------+-------------+ ( See attached file : CFXreg_o.jpg ) After that i've restarted the CF server. 4) But when i try it, i got the message : ( See attached file : CFXerr_o.jpg ) The CFX custom tag "CFX_HelloColdFusion" was not found in the custom tag database. Please be sure to add custom tags to the database before using them. If you have added your tag to the database then you should check the spelling of the tag within your template to insure that it matches the database entry. So, could you help me for this problem ? Where have i to put the files : - the .java file - the .class file - the .cfm file Is there something i have to do for registering ? More, CF administrating page tells me about a "Current Custom Tag Paths" : D:\_Apps\web\CFusionMX\CustomTags But what kind of file must exist in this directory ? ( For this moment, it is empty ). Thanks for answer. |
|
#2
|
|||
|
|||
|
Sorry, can't help with this one as I have never written a CFX file. Nowadays if I need to do something in Java, I'll call a straight Java class with cfobject or createObject(), and then write a wrapper CFC (ColdFusion Component) which I invoke from my CFML pages.
|
|
#3
|
|||
|
|||
|
try put the files .java and .class in the folder "classes".
the complete path is similar to C:\JRun4\servers\cfusion\cfusion-ear\cfusion-war\WEB-INF\classes , or only ...\WEB-INF\classes |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > CFX Tag |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|