Anyone know if there is a way to embed Java scriptlets into CFML pages like
you would in JSP pages?

The reason I ask is that since CFMX came out, I've been generating a lot of
code that uses Java, especially the java.util package.  So I have snips of
code like this all over my apps:

<cfscript>
   missing = createObject("java", "java.util.ArrayList");
   missing.init(request.neededfilenames.clone());
   missing.removeAll(request.foundfilenames);
   createObject("java", "java.util.Collections").sort(missing);
</cfscript>

Rather than something like this, which is far easier to read:

<%
   missing = new java.util.ArrayList(request.neededfilenames.clone());
   missing.removeAll(request.foundfilenames);
   java.util.Collections.sort(missing);
%>

Yeah, yeah, I know, move to JSP so I don't have to worry about it.  But CF
is so damn nice, and that's what my apps are all written in already, so that
would be a pain (not to mention a decision that's not mine to make anyway).
Just throwing that out there, since I know there are MacroMedians on the
list.

cheers,
barneyb

---
Barney Boisvert, Senior Development Engineer
AudienceCentral (formerly PIER System, Inc.)
[EMAIL PROTECTED]
voice : 360.671.8708 x12
fax   : 360.647.5351


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.455 / Virus Database: 255 - Release Date: 2/13/2003

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
Get the mailserver that powers this list at http://www.coolfusion.com

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to