Dick,
Can we see your code? Cant you have a method that converts CF String "null" to
Java String=null?
> tried to invoke it with cfobject. We could not
> make the interface work
> because we could not pass Nulls between CF and
> Java.
Here is an example
public class StringType{
private String str;
public String getString(String s){
String val="";
str=s;
if(str.equals("null")){
val="Your String was null, setting to null now<br>";
str = null;
val= val+ " " +"Now Java value is : <b>"+ str +"</b>";
}
return val;
}
}
You can invoke it with
<cfobject action="CREATE" class="StringType" name="chkNull" type="JAVA">
<cfoutput>
#chkNull.getString("null")#
</cfoutput>
if you can post your code, we can try figure it out. Let me know.
Joe
On Mon, 25 Nov 2002 06:54:03 -0800 Dick Applebaum <[EMAIL PROTECTED]> wrote:
> On Monday, November 25, 2002, at 01:43 AM,
> Jochem van Dieten wrote:
>
> > Quoting Dave Carabetta :
> >>
> >> While I understand this isn't a feature that
> everybody would use, I
> >> would personally like to see MM focus on
> encapsulating some more Java
> >> features into easy-to-use black-box CF tags
> rather than having to code
> >> my own Java.
> >
> > I agree. For instance, it would be far better
> if CF had a tag to get at
> > the DatabaseMetaData interface instead of
> making it marginally easier
> > to
> > write it yourself by allowing inline Java.
>
> This is an excellent example & I expect that
> this will be one of the
> most-requested capabilities -- to be able to
> get DatabaseMetaData into
> CF. I tried to do this, with help from Sean
> Corfield -- without
> success. I found a working Java program that
> extracts metadata, and
> tried to invoke it with cfobject. We could not
> make the interface work
> because we could not pass Nulls between CF and
> Java.
>
> This is for a general-purpose developer utility
> that I use to
> manipulate databases. It is especially useful
> on remote (shared) sites
> where you don't have administrative
> privileges.
>
> I have been doing this a long time with CF 4.5
> and CF 5 on win
> platforms using cfobject to manipulate COM
> objects.
>
> But, I would like to be able to do the same
> thing with CFMX on
> non-windows platforms.
>
> Here's the difficulty:
>
> With CFMX:
>
> I can get at the equivalent of DatabaseMetaData
> on a remote windows
> box, using cfobject and COM objects.
>
> But, I can't get at the DatabaseMetaData on my
> local Unix (Mac OS X)
> developer machine -- you can't use COM objects
> and can't pass the Nulls
> to the Java program that gets the
> DatabaseMetaData.
>
> I suppose there is a way to circumvent the need
> to pass Nulls between
> CF and Java, but I have not had time to
> investigate this.
>
> > And especially from the point of view of
> security built-in tags are
> > better. All those JSP tags and Java classes
> are nice, but on a shared
> > server you need to disable them anyway
> because the same mechanism that
> > is used to access them can be used to break
> out of the sandbox.
> >
>
> Is this true for CFMXJ2ee on JRun, Websphere or
> whatever?
>
> I thought that one of the advantages of
> CFMXJ2ee on a J2ee-compliant
> app server, is the ability to interoperate
> between CF and Java programs.
>
> Will this be possible with Java access
> disabled?
>
> For the DatabaseMetaData example, I would
> prefer the CF tag approach.
>
> But, I still think it is valid to use Java,
> where warranted, on a
> developer machine.
>
>
> Dick
>
>
> > Jochem
> >
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm