Executing Java in CF
Hi, I'm having no luck finding this documentation, maybe someone know off the top of their head. I have some server sided java code I need to execute in a coldfusion page. That may call either a .war or .jar file. How do I specify in the CF page that a portion of the code is JAVA? Thanks, Robert Robert B. Harrison Director of Interactive Services Austin Williams 125 Kennedy Drive, Suite 100 Hauppauge NY 11788 P : 631.231.6600 Ext. 119 F : 631.434.7022 http://www.austin-williams.com Great advertising can't be either/or. It must be . Plug in to our blog: AW Unplugged http://www.austin-williams.com/unplugged ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:347705 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Executing Java in CF
make sure the java class files are loaded by CF, stick them in the lib folder for example then restart cf, then check in the cf info page in the cfadmin and see if they loaded, then you will be able to call the functions using CreateObject(java) just as u would any of the built in java functions. On Mon, Sep 26, 2011 at 4:25 PM, Robert Harrison rob...@austin-williams.com wrote: Hi, I'm having no luck finding this documentation, maybe someone know off the top of their head. I have some server sided java code I need to execute in a coldfusion page. That may call either a .war or .jar file. How do I specify in the CF page that a portion of the code is JAVA? Thanks, Robert Robert B. Harrison Director of Interactive Services Austin Williams 125 Kennedy Drive, Suite 100 Hauppauge NY 11788 P : 631.231.6600 Ext. 119 F : 631.434.7022 http://www.austin-williams.com Great advertising can't be either/or. It must be . Plug in to our blog: AW Unplugged http://www.austin-williams.com/unplugged ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:347708 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Executing Java in CF
make sure the java class files are loaded by CF, stick them in the lib folder for example then restart cf, then check in the cf info page in the cfadmin and see if they loaded, then you will be able to call the functions using CreateObject(java) just as u would any of the built in java functions. Also don't forget that there is the javaloader cfc. It lets you put the class library wherever you want it without restarting cf. http://www.compoundtheory.com/?action=displayPostID=117 ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:347723 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: What is the version of Java SDK CF should use?
It would sure be handy if Adobe would update their FAQ page with the most current supported of Java... it's hard to justify moving to version XXX if it's not officially supported by Adobe. Matthew Williams Geodesic GraFX www.geodescigrafx.com/blog ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333650 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: What is the version of Java SDK CF should use?
It would sure be handy if Adobe would update their FAQ page with the most current supported of Java... it's hard to justify moving to version XXX if it's not officially supported by Adobe. They only do that if they've tested the new JVM, which doesn't happen in most cases. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333651 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: What is the version of Java SDK CF should use?
Ok, I'm not starting a war or anything here... I agree with Dave as to the fact that it doesn't happen in most cases. But I believe it should. If you code something that uses underlying code/structure/etc made by someone else and that code/structure/etc gets updated due to security issues/etc, then you should validate your stuff against the new version. If it works then great support it, suggest that people upgrade and give the clients instructions on how to implement it with you system as well as how to remove the older version that you installed with your product. If it doesn't work, then create a hotfix/updater/etc that will make it work. I mean if you built something based off of ProgramX, you installed ProgramX on my computer and then the creators of ProgramX determine that it will do something like give hackers credit card numbers and pins, but when they produce a fix you don't support it, then I think you are responsible when my credit card numbers are released. After all, your install put the bad software on my system. I mean after all, if you buy a car with a defective part (every car has a defective part not just 1), they recall the car and replace the part. The responsibility lies both with the automaker and the parts manufacturer. Just my .02. Feel free to ignore. -Original Message- From: Dave Watts [mailto:dwa...@figleaf.com] Sent: Thursday, May 13, 2010 1:13 PM To: cf-talk Subject: Re: What is the version of Java SDK CF should use? It would sure be handy if Adobe would update their FAQ page with the most current supported of Java... it's hard to justify moving to version XXX if it's not officially supported by Adobe. They only do that if they've tested the new JVM, which doesn't happen in most cases. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333653 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: What is the version of Java SDK CF should use?
Right... I'm thinking back to the release of 8 (or 8.01) with an early version of JVM 6. This JVM had known issues with classes and such with CFC and memory scope intensive apps. Did Adobe every officially support _10 or so that fixed that? In addition, security fixes do eventually come down the pipe, and it'd be nice if instead of just trying XX release of the JVM, that Adobe could say yep, we only support _xx, you'll be fine to move to that. Matthew Williams Geodesic GraFX www.geodesicgrafx.com/blog ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333659 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: What is the version of Java SDK CF should use?
On Thu, May 13, 2010 at 10:55 AM, Matthew Williams mai...@geodesicgrafx.com wrote: Right... I'm thinking back to the release of 8 (or 8.01) with an early version of JVM 6. This JVM had known issues with classes and such with CFC and memory scope intensive apps. Functionally, the supported JVM worked just fine and had undergone Adobe's full test suite process. Yes, that JVM had a class loading bug that caused performance problems for a certain class of CFML applications (frankly, a small percentage of real-world apps) but it caused the same problems for non-CFML apps too in some situations. For the vast majority of CFers, CF8/8.01 on that supported JVM was just fine. Did Adobe every officially support _10 or so that fixed that? No, but please don't underestimate the resources needed to fully QA a new combination of system components. Adobe (and Macromedia before them) have long provided instructions on how to upgrade the JVM for ColdFusion but it's always been clear that only a few combinations are officially supported. That makes perfect sense from a business p.o.v., especially when *most* CFers were not running into the class loading performance bug. In addition, security fixes do eventually come down the pipe, and it'd be nice if instead of just trying XX release of the JVM, that Adobe could say yep, we only support _xx, you'll be fine to move to that. And I'm sure if a critical security fix for the JVM appeared, Adobe would treat it like any other critical security issue around ColdFusion and issue a Hot Fix (as they just did this week). Considering there are CFers out there who view their applications as too mission critical to upgrade ColdFusion under the hood, I'm surprised people aren't a bit more sympathetic to the same issue when it's on the other side of the fence. -- Sean A Corfield -- (904) 302-SEAN Railo Technologies, Inc. -- http://getrailo.com/ An Architect's View -- http://corfield.org/ If you're not annoying somebody, you're not really alive. -- Margaret Atw ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333663 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
What is the version of Java SDK CF should use?
All: I am using CF 8 and the System Info page shows the Java Version is 1.6.0_01 and Java VM Version is 1.6.0_01b-06. Is that the latest java CF should use? If not, what's the latest one? Is it the Version 6 Update 20 on java.com? Nathan Chen ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333624 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: What is the version of Java SDK CF should use?
I would recommend anything later than updater 10. Just make sure you get the JDK and not just the JRE. I'm using 1.6.0_12 on my CF8 servers. ~Brad Original Message Subject: What is the version of Java SDK CF should use? From: Nathan Chen nathan.c...@cu.edu Date: Wed, May 12, 2010 4:08 pm To: cf-talk cf-talk@houseoffusion.com I am using CF 8 and the System Info page shows the Java Version is 1.6.0_01 and Java VM Version is 1.6.0_01b-06. Is that the latest java CF should use? If not, what's the latest one? Is it the Version 6 Update 20 on java.com? ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333625 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: What is the version of Java SDK CF should use?
We just implemented 6.20 (1.6.0_20) on a new server with CF 8.0.1 and it's running fine. On 5/12/2010 5:24 PM, b...@bradwood.com wrote: I would recommend anything later than updater 10. Just make sure you get the JDK and not just the JRE. I'm using 1.6.0_12 on my CF8 servers. ~Brad Original Message Subject: What is the version of Java SDK CF should use? From: Nathan Chennathan.c...@cu.edu Date: Wed, May 12, 2010 4:08 pm To: cf-talkcf-talk@houseoffusion.com I am using CF 8 and the System Info page shows the Java Version is 1.6.0_01 and Java VM Version is 1.6.0_01b-06. Is that the latest java CF should use? If not, what's the latest one? Is it the Version 6 Update 20 on java.com? ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333632 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Version of Java for CF and Adobe's Suite of products?
What's the benefit of using _13 over _11? I need something to through at management to cover the why questions. Well, each version fixes bugs in previous versions. If 11 is working fine for you, though, there's no specific reason I can give you to upgrade. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Create robust enterprise, web RIAs. Upgrade to ColdFusion 8 and integrate with Adobe Flex http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:287301 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Version of Java for CF and Adobe's Suite of products?
I don't want to just update to the latest ersion of Java without having an idea of what Adobe recommends. Does anyone have any idea? That is a very general question. Different versions of different Adobe products use and support different JVMs. ColdFusion 7 comes with JVM 1.4.2_09, and supports 1.4.2_13 or earlier. ColdFusion 8 comes with JVM 1.6.0_01. Other Adobe products may require other JVMs. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| ColdFusion is delivering applications solutions at at top companies around the world in government. Find out how and where now http://www.adobe.com/cfusion/showcase/index.cfm?event=finderproductID=1522loc=en_us Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:287172 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Version of Java for CF and Adobe's Suite of products?
That is a very general question. Different versions of different Adobe products use and support different JVMs. ColdFusion 7 comes with JVM 1.4.2_09, and supports 1.4.2_13 or earlier. ColdFusion 8 Hi Dave, is there documentation on CF7 supporting _13 somewhere? The last I remember seeing in the feature matrix was _11, but if a newer version is supported we'd like to check it out. -Justin Scott ~| ColdFusion 8 - Build next generation apps today, with easy PDF and Ajax features - download now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:287177 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Version of Java for CF and Adobe's Suite of products?
Hi Dave, is there documentation on CF7 supporting _13 somewhere? The last I remember seeing in the feature matrix was _11, but if a newer version is supported we'd like to check it out. I believe the latest version listed on the Adobe site is 11, but when talking to some (relatively high-level) Adobe tech support people, they said that 13 had been tested and was supported. After that, I started using 13 and haven't looked back. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| ColdFusion 8 - Build next generation apps today, with easy PDF and Ajax features - download now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:287262 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Version of Java for CF and Adobe's Suite of products?
What's the benefit of using _13 over _11? I need something to through at management to cover the why questions. Matthew Williams Geodesic GraFX www.geodesicgrafx.com/blog ~| ColdFusion is delivering applications solutions at at top companies around the world in government. Find out how and where now http://www.adobe.com/cfusion/showcase/index.cfm?event=finderproductID=1522loc=en_us Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:287268 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Version of Java for CF and Adobe's Suite of products?
I don't want to just update to the latest ersion of Java without having an idea of what Adobe recommends. Does anyone have any idea? Thanks D ~| Enterprise web applications, build robust, secure scalable apps today - Try it now ColdFusion Today ColdFusion 8 beta - Build next generation apps Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:286933 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: upgrade java in CF
There are a few features of ColdFusion fetures that have a problem running on any newer JVM than 1.4.2 (URL below). However, none are critical to the core functionality of ColdFusion and the vast majority of people won't see any problems. We've actually just upgraded to 1.6 and have been running it for two weeks without a hitch. http://www.houseoffusion.com/groups/CF-Talk/thread.cfm/threadid:42504 Steve Brownlee http://www.fusioncube.net/ -Original Message- From: Nathan Chen [mailto:[EMAIL PROTECTED] Sent: Monday, March 19, 2007 5:59 PM To: CF-Talk Subject: upgrade java in CF Hi, All: Does anyone know if it is ok to upgrade the current Java version(1.4.2_09) to the newest java 1.5.0_06? My network security guys found a vulnerability on my CF server and would like to upgrade to 1.5.0_06. Does anyone know the upgrade will affect anything? Nathan Chen ~| ColdFusion MX7 and Flex 2 Build sales marketing dashboard RIAâs for your business. Upgrade now http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:273076 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: upgrade java in CF
But you have also rendered your install unsupported by adobe. -Original Message- From: Steve Brownlee [mailto:[EMAIL PROTECTED] Sent: 20 March 2007 12:09 To: CF-Talk Subject: RE: upgrade java in CF There are a few features of ColdFusion fetures that have a problem running on any newer JVM than 1.4.2 (URL below). However, none are critical to the core functionality of ColdFusion and the vast majority of people won't see any problems. We've actually just upgraded to 1.6 and have been running it for two weeks without a hitch. http://www.houseoffusion.com/groups/CF-Talk/thread.cfm/threadid:42504 Steve Brownlee http://www.fusioncube.net/ -Original Message- From: Nathan Chen [mailto:[EMAIL PROTECTED] Sent: Monday, March 19, 2007 5:59 PM To: CF-Talk Subject: upgrade java in CF Hi, All: Does anyone know if it is ok to upgrade the current Java version(1.4.2_09) to the newest java 1.5.0_06? My network security guys found a vulnerability on my CF server and would like to upgrade to 1.5.0_06. Does anyone know the upgrade will affect anything? Nathan Chen ~| ColdFusion MX7 and Flex 2 Build sales marketing dashboard RIAâs for your business. Upgrade now http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:273077 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: upgrade java in CF
Yes, of course, that's been noted earlier in the thread. -Original Message- From: Robertson-Ravo, Neil (RX) [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 20, 2007 8:10 AM To: CF-Talk Subject: RE: upgrade java in CF But you have also rendered your install unsupported by adobe. -Original Message- From: Steve Brownlee [mailto:[EMAIL PROTECTED] Sent: 20 March 2007 12:09 To: CF-Talk Subject: RE: upgrade java in CF There are a few features of ColdFusion fetures that have a problem running on any newer JVM than 1.4.2 (URL below). However, none are critical to the core functionality of ColdFusion and the vast majority of people won't see any problems. We've actually just upgraded to 1.6 and have been running it for two weeks without a hitch. http://www.houseoffusion.com/groups/CF-Talk/thread.cfm/threadid:42504 Steve Brownlee http://www.fusioncube.net/ -Original Message- From: Nathan Chen [mailto:[EMAIL PROTECTED] Sent: Monday, March 19, 2007 5:59 PM To: CF-Talk Subject: upgrade java in CF Hi, All: Does anyone know if it is ok to upgrade the current Java version(1.4.2_09) to the newest java 1.5.0_06? My network security guys found a vulnerability on my CF server and would like to upgrade to 1.5.0_06. Does anyone know the upgrade will affect anything? Nathan Chen ~| ColdFusion MX7 by Adobe® Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:273079 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: upgrade java in CF
Indeed, but surely then the risk of something not working and you not getting any help/support is too great to ignore? -Original Message- From: Steve Brownlee [mailto:[EMAIL PROTECTED] Sent: 20 March 2007 12:17 To: CF-Talk Subject: RE: upgrade java in CF Yes, of course, that's been noted earlier in the thread. -Original Message- From: Robertson-Ravo, Neil (RX) [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 20, 2007 8:10 AM To: CF-Talk Subject: RE: upgrade java in CF But you have also rendered your install unsupported by adobe. -Original Message- From: Steve Brownlee [mailto:[EMAIL PROTECTED] Sent: 20 March 2007 12:09 To: CF-Talk Subject: RE: upgrade java in CF There are a few features of ColdFusion fetures that have a problem running on any newer JVM than 1.4.2 (URL below). However, none are critical to the core functionality of ColdFusion and the vast majority of people won't see any problems. We've actually just upgraded to 1.6 and have been running it for two weeks without a hitch. http://www.houseoffusion.com/groups/CF-Talk/thread.cfm/threadid:42504 Steve Brownlee http://www.fusioncube.net/ -Original Message- From: Nathan Chen [mailto:[EMAIL PROTECTED] Sent: Monday, March 19, 2007 5:59 PM To: CF-Talk Subject: upgrade java in CF Hi, All: Does anyone know if it is ok to upgrade the current Java version(1.4.2_09) to the newest java 1.5.0_06? My network security guys found a vulnerability on my CF server and would like to upgrade to 1.5.0_06. Does anyone know the upgrade will affect anything? Nathan Chen ~| Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 Flex 2 Free Trial http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:273081 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: upgrade java in CF
Absolutely, Neil, and thank you, yet again, for pointing it out. That risk should never be left out of the decision making process. -Original Message- From: Robertson-Ravo, Neil (RX) [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 20, 2007 8:21 AM To: CF-Talk Subject: RE: upgrade java in CF Indeed, but surely then the risk of something not working and you not getting any help/support is too great to ignore? -Original Message- From: Steve Brownlee [mailto:[EMAIL PROTECTED] Sent: 20 March 2007 12:17 To: CF-Talk Subject: RE: upgrade java in CF Yes, of course, that's been noted earlier in the thread. -Original Message- From: Robertson-Ravo, Neil (RX) [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 20, 2007 8:10 AM To: CF-Talk Subject: RE: upgrade java in CF But you have also rendered your install unsupported by adobe. -Original Message- From: Steve Brownlee [mailto:[EMAIL PROTECTED] Sent: 20 March 2007 12:09 To: CF-Talk Subject: RE: upgrade java in CF There are a few features of ColdFusion fetures that have a problem running on any newer JVM than 1.4.2 (URL below). However, none are critical to the core functionality of ColdFusion and the vast majority of people won't see any problems. We've actually just upgraded to 1.6 and have been running it for two weeks without a hitch. http://www.houseoffusion.com/groups/CF-Talk/thread.cfm/threadid:42504 Steve Brownlee http://www.fusioncube.net/ -Original Message- From: Nathan Chen [mailto:[EMAIL PROTECTED] Sent: Monday, March 19, 2007 5:59 PM To: CF-Talk Subject: upgrade java in CF Hi, All: Does anyone know if it is ok to upgrade the current Java version(1.4.2_09) to the newest java 1.5.0_06? My network security guys found a vulnerability on my CF server and would like to upgrade to 1.5.0_06. Does anyone know the upgrade will affect anything? Nathan Chen ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJQ Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:273083 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: upgrade java in CF
I should also note that we currently run the 1.5 JDK in production and have done so for the past 18 months without any problems (also noting that we do not use any of the features discussed in the URL below). I'm sure there are other stories of companies who have upgraded and stories of companies who cannot, so take into account that some of your tags may not work, and that you must thoroughly test and QA your application before putting it into production. Just to be clear, our recent switch to 1.6 JDK is just in development and hasn't yet made it to QA or production. Steve Brownlee http://www.fusioncube.net/ -Original Message- From: Steve Brownlee [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 20, 2007 8:09 AM To: CF-Talk Subject: RE: upgrade java in CF There are a few features of ColdFusion fetures that have a problem running on any newer JVM than 1.4.2 (URL below). However, none are critical to the core functionality of ColdFusion and the vast majority of people won't see any problems. We've actually just upgraded to 1.6 and have been running it for two weeks without a hitch. http://www.houseoffusion.com/groups/CF-Talk/thread.cfm/threadid:42504 Steve Brownlee http://www.fusioncube.net/ -Original Message- From: Nathan Chen [mailto:[EMAIL PROTECTED] Sent: Monday, March 19, 2007 5:59 PM To: CF-Talk Subject: upgrade java in CF Hi, All: Does anyone know if it is ok to upgrade the current Java version(1.4.2_09) to the newest java 1.5.0_06? My network security guys found a vulnerability on my CF server and would like to upgrade to 1.5.0_06. Does anyone know the upgrade will affect anything? Nathan Chen ~| Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 Flex 2 Free Trial http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:273088 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: upgrade java in CF
Hi, JVM 1.5 flex services will not work and also if you calling your CFC remotely will not work; I mean you cannot call your CFC in url like this http://localhost/test.cfc [you will have servlet error] webservice stub loader having problem with JVM 1.5: web config connector having problem will throw mBean error. The best you can upgrade is JVM 1.4.2_13, its works really nice. ~| Macromedia ColdFusion MX7 Upgrade to MX7 experience time-saving features, more productivity. http://www.adobe.com/products/coldfusion?sdid=RVJW Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:273091 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: upgrade java in CF
Andrew Scott wrote: With all this talk about upgrading the java runtime, what is the process in doing so. Is it just a simple matter of backing up the lib directory and dropping the new libs in there? Andrew Scott I wrote up a HowTo a few weeks ago: http://www.stillnetstudios.com/2007/02/24/upgrading-the-coldfusion-jvm-on-linux-and-windows/ -Ryan ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJQ Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:273098 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
upgrade java in CF
Hi, All: Does anyone know if it is ok to upgrade the current Java version(1.4.2_09) to the newest java 1.5.0_06? My network security guys found a vulnerability on my CF server and would like to upgrade to 1.5.0_06. Does anyone know the upgrade will affect anything? Nathan Chen ~| Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 Flex 2 Free Trial http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:273043 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: upgrade java in CF
Yes, ColdFusion MX is not supported on Java 1.5 Mark On 3/20/07, Nathan Chen [EMAIL PROTECTED] wrote: Hi, All: Does anyone know if it is ok to upgrade the current Java version(1.4.2_09) to the newest java 1.5.0_06? My network security guys found a vulnerability on my CF server and would like to upgrade to 1.5.0_06. Does anyone know the upgrade will affect anything? Nathan Chen ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:273045 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: upgrade java in CF
Nathan, ColdFusion is not supported on 1.5. I believe the highest you can go to is 1.4.2_11. HTH, Phil -Original Message- From: Nathan Chen [mailto:[EMAIL PROTECTED] Sent: Monday, March 19, 2007 5:59 PM To: CF-Talk Subject: upgrade java in CF Hi, All: Does anyone know if it is ok to upgrade the current Java version(1.4.2_09) to the newest java 1.5.0_06? My network security guys found a vulnerability on my CF server and would like to upgrade to 1.5.0_06. Does anyone know the upgrade will affect anything? Nathan Chen ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:273046 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: upgrade java in CF
I've successfully tested to 1.4.2_12, and it seems to fix some memory issues on some sites I was dealing with. It is not Adobe certified though. Phillip Duba wrote: Nathan, ColdFusion is not supported on 1.5. I believe the highest you can go to is 1.4.2_11. HTH, Phil -Original Message- From: Nathan Chen [mailto:[EMAIL PROTECTED] Sent: Monday, March 19, 2007 5:59 PM To: CF-Talk Subject: upgrade java in CF Hi, All: Does anyone know if it is ok to upgrade the current Java version(1.4.2_09) to the newest java 1.5.0_06? My network security guys found a vulnerability on my CF server and would like to upgrade to 1.5.0_06. Does anyone know the upgrade will affect anything? Nathan Chen ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:273047 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: upgrade java in CF
With all this talk about upgrading the java runtime, what is the process in doing so. Is it just a simple matter of backing up the lib directory and dropping the new libs in there? Andrew Scott Senior Coldfusion Developer Aegeon Pty. Ltd. www.aegeon.com.au Phone: +613 8676 4223 Mobile: 0404 998 273 ~| Upgrade to Adobe ColdFusion MX7 The most significant release in over 10 years. Upgrade see new features. http://www.adobe.com/products/coldfusion?sdid=RVJR Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:273053 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: upgrade java in CF
For multi server instance, you simply install the new JRE to a directory in the filesystem. Then, open jvm.config in your bin directory and point the java.home variable to the new path. Then, restart your cf server. MAKE SURE TO BACK UP JVM.CONFIG BEFORE MAKING THIS CHANGE just in case something goes wrong. Andrew Scott wrote: With all this talk about upgrading the java runtime, what is the process in doing so. Is it just a simple matter of backing up the lib directory and dropping the new libs in there? Andrew Scott Senior Coldfusion Developer Aegeon Pty. Ltd. www.aegeon.com.au Phone: +613 8676 4223 Mobile: 0404 998 273 ~| ColdFusion MX7 and Flex 2 Build sales marketing dashboard RIAâs for your business. Upgrade now http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:273054 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Java to CF translation
Andrew, Are you saying that I can almost directly copy and paste that java example into a cfscript block? What you have in this email seems to be a copy of the wiki example... Duncan, This is off the top of my head, but you would be best to do it this way, and remember cfdump is your friend here too. script for ( Iterator entries = logEntries.iterator( ); entries.hasNext( ) ; ) { logEntry = entries.next( ); WriteOutput( - ); WriteOutput(revision: + logEntry.getRevision( ) ); WriteOutput( author: + logEntry.getAuthor( ) ); WriteOutput( date: + logEntry.getDate( ) ); WriteOutput( log message: + logEntry.getMessage( ) ); if ( logEntry.getChangedPaths( ).size( ) 0 ) { WriteOutput( ); WriteOutput( changed paths: ); /script On 3/9/07, Duncan [EMAIL PROTECTED] wrote: ~| ColdFusion MX7 by Adobe® Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. Free Trial. http://www.adobe.com/products/coldfusion Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:272320 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Java to CF translation
Sorry - on closer examination that isnt the case. I will get back to you and we can see if this is more on the right lines. Andrew, Are you saying that I can almost directly copy and paste that java example into a cfscript block? What you have in this email seems to be a copy of the wiki example... ~| Macromedia ColdFusion MX7 Upgrade to MX7 experience time-saving features, more productivity. http://www.adobe.com/products/coldfusion Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:272321 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Java to CF translation
andrew, Thanks for the push here is what I ended up with: cfif f.getChangedPaths().size() gt 0 cfset changedPathsSet = f.getChangedPaths().keySet() cfset changedPaths = changedPathsSet.iterator() cfloop condition=changedPaths.hasNext() cfset t=changedPaths.next() cfset QueryAddRow(Q) cfset Q.Message[Q.RecordCount]=f.getMessage() cfset Q.Date[Q.RecordCount]=f.getDate() cfset Q.Author[Q.RecordCount]=f.getAuthor() cfset Q.Revision[Q.RecordCount]=f.getRevision() cfset Q.Path[Q.RecordCount]=t /cfloop /cfif Duncan, This is off the top of my head, but you would be best to do it this way, and remember cfdump is your friend here too. script for ( Iterator entries = logEntries.iterator( ); entries.hasNext( ) ; ) { logEntry = entries.next( ); WriteOutput( - ); WriteOutput(revision: + logEntry.getRevision( ) ); WriteOutput( author: + logEntry.getAuthor( ) ); WriteOutput( date: + logEntry.getDate( ) ); WriteOutput( log message: + logEntry.getMessage( ) ); if ( logEntry.getChangedPaths( ).size( ) 0 ) { WriteOutput( ); WriteOutput( changed paths: ); /script On 3/9/07, Duncan [EMAIL PROTECTED] wrote: ~| Create Web Applications With ColdFusion MX7 Flex 2. Build powerful, scalable RIAs. Free Trial http://www.adobe.com/products/coldfusion/flex2/ Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:272329 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Java to CF translation
Duncan, This is off the top of my head, but you would be best to do it this way, and remember cfdump is your friend here too. script for ( Iterator entries = logEntries.iterator( ); entries.hasNext( ) ; ) { logEntry = entries.next( ); WriteOutput( - ); WriteOutput(revision: + logEntry.getRevision( ) ); WriteOutput( author: + logEntry.getAuthor( ) ); WriteOutput( date: + logEntry.getDate( ) ); WriteOutput( log message: + logEntry.getMessage( ) ); if ( logEntry.getChangedPaths( ).size( ) 0 ) { WriteOutput( ); WriteOutput( changed paths: ); /script On 3/9/07, Duncan [EMAIL PROTECTED] wrote: I am working on a small page for our intranet, printing out a complete history of a repository history. I have been taking some leaves out of CFDIFF (Thanks to Rick Osborne for doing lots of the hard yards!) and rolling my own bits. I have had some reasonable success with SVNKit, but this bit has me stumped - I think its just my understanding of the docs and lack of ability to translate it to CF code, so I hope someone can help! I have the list of all logEntries, but I now need the files for each revision. The problem is this line: SVNLogEntry logEntry = ( SVNLogEntry ) entries.next( ); From https://wiki.svnkit.com/Printing_Out_Repository_History I have cfset i=ent.iterator() cfloop condition=i.hasNext() cfset f=i.next() cfset fileentries = createObject(java,org.tmatesoft.svn.core.SVNLogEntry).init() /cfloop but I cant work out how to pass f into the init for SVNLogEntry which looks to be the equivalent of what they do in the Java example Here is the complete Java tutorial for this http://svnkit.com/kb/javadoc/org/tmatesoft/svn/core/SVNLogEntry.html And thanks to Rick Osborne for publishing cfdiff that has helped me get this far! Can anyone help? -- Duncan I Loxton [EMAIL PROTECTED] ~| Create Web Applications With ColdFusion MX7 Flex 2. Build powerful, scalable RIAs. Free Trial http://www.adobe.com/products/coldfusion/flex2/ Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:272125 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Java to CF translation
I am working on a project where I translate CF into Java (JSP 2.x - BEA WL). Any tips would be appreciated! :-) ~~~ OÄuz Demirkapı TeraTech Inc. | Senior Developer 405 East Gude Dr Suite 207, Rockville, MD 20850, USA Voice: +1 (301) 424-3903 ext 111 | Fax: +1 (301) 762-8185 Web: http://www.teratech.com | E-mail: oguz.demirkapi AT teratech.com Winner in CFDJ awards Best Consulting. Member Team Fusebox. ~~~ ~| Macromedia ColdFusion MX7 Upgrade to MX7 experience time-saving features, more productivity. http://www.adobe.com/products/coldfusion Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:272151 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Java to CF translation
I am working on a small page for our intranet, printing out a complete history of a repository history. I have been taking some leaves out of CFDIFF (Thanks to Rick Osborne for doing lots of the hard yards!) and rolling my own bits. I have had some reasonable success with SVNKit, but this bit has me stumped - I think its just my understanding of the docs and lack of ability to translate it to CF code, so I hope someone can help! I have the list of all logEntries, but I now need the files for each revision. The problem is this line: SVNLogEntry logEntry = ( SVNLogEntry ) entries.next( ); From https://wiki.svnkit.com/Printing_Out_Repository_History I have cfset i=ent.iterator() cfloop condition=i.hasNext() cfset f=i.next() cfset fileentries = createObject(java,org.tmatesoft.svn.core.SVNLogEntry).init() /cfloop but I cant work out how to pass f into the init for SVNLogEntry which looks to be the equivalent of what they do in the Java example Here is the complete Java tutorial for this http://svnkit.com/kb/javadoc/org/tmatesoft/svn/core/SVNLogEntry.html And thanks to Rick Osborne for publishing cfdiff that has helped me get this far! Can anyone help? -- Duncan I Loxton [EMAIL PROTECTED] ~| Create Web Applications With ColdFusion MX7 Flex 2. Build powerful, scalable RIAs. Free Trial http://www.adobe.com/products/coldfusion/flex2/ Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:272123 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Who do i write this JAVA in CF?
Ok I've got an object called port and I've done all the stuff i need to it and now i need to call a function inside my port object called getTax and pass it another object i created call getTaxRequest. All of these object are java object created using the CreateObject method in CF. but i'm a bit baffeled by this line of java code: GetTaxResult getTaxResult = port.getTax(getTaxRequest); I know what it's doing in java. it's creating a new var called getTaxResult of object type GetTaxResult but I'm not sure how to translate this to cfscript code. Do i need to use the javacast function some how to achieve this?? thanks in advance jonese ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:257286 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Who do i write this JAVA in CF?
If you aren't sure what properties or methods the object contains, you can use cfdump to examine it. -Original Message- From: jonese [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: 10/18/06 5:26 PM Subject: Who do i write this JAVA in CF? Ok I've got an object called port and I've done all the stuff i need to it and now i need to call a function inside my port object called getTax and pass it another object i created call getTaxRequest. All of these object are java object created using the CreateObject method in CF. but i'm a bit baffeled by this line of java code: GetTaxResult getTaxResult = port.getTax(getTaxRequest); I know what it's doing in java. it's creating a new var called getTaxResult of object type GetTaxResult but I'm not sure how to translate this to cfscript code. Do i need to use the javacast function some how to achieve this?? thanks in advance jonese ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:257292 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Who do i write this JAVA in CF?
Jonese, You don't have to type objects in CF... You can just call stuff directly: cfscript getTaxResult = port.getTax(getTaxRequest); /cfscript Assuming that port already exists and getTagRequest already exists. .. Ben Nadel Certified Advanced ColdFusion Developer www.bennadel.com -Original Message- From: jonese [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 18, 2006 5:26 PM To: CF-Talk Subject: Who do i write this JAVA in CF? Ok I've got an object called port and I've done all the stuff i need to it and now i need to call a function inside my port object called getTax and pass it another object i created call getTaxRequest. All of these object are java object created using the CreateObject method in CF. but i'm a bit baffeled by this line of java code: GetTaxResult getTaxResult = port.getTax(getTaxRequest); I know what it's doing in java. it's creating a new var called getTaxResult of object type GetTaxResult but I'm not sure how to translate this to cfscript code. Do i need to use the javacast function some how to achieve this?? thanks in advance jonese ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:257294 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Who do i write this JAVA in CF?
This GetTaxResult getTaxResult = port.getTax(getTaxRequest); Looks like this in CF cfset GetTaxResult = CreateObject(java, port).getTax(getTaxRequest) ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:257310 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
I just created deserialize and view object web service in pure java inside CF
I just created deserialize and view object web service in pure java inside CF The main goal was show how you can transfer java objects into a pure java web services inside CF effectively getting around that limitation. Accepts only wddx which are deserialize java objects and it only has one method GiveToSax() (org.xml.sax.InputSource) and only returns only string data. example: cfset myQuery = QueryNew(Ticker, Sector, VarChar, VarChar) / cfwddx action=cfml2wddx input=#myQuery# output=JWS cfinvoke webservice=http://www.cfide.org/DeserializeAndViewObject.jws?WSDL; method=GiveToSax returnvariable=returnedBigString cfinvokeargument name=str value=#JWS# / /cfinvoke cfoutputpre#returnedBigString#/pre/cfoutput Returns something like this public class coldfusion.sql.QueryTable extends coldfusion.sql.Table implementsjavax.sql.RowSet, coldfusion.wddx.RecordSet { /*** CONSTRUCTORS ***/ public coldfusion.sql.QueryTable(com.allaire.cfx.Query) public coldfusion.sql.QueryTable(java.sql.ResultSet) public coldfusion.sql.QueryTable(int) public coldfusion.sql.QueryTable(coldfusion.sql.QueryTable) public coldfusion.sql.QueryTable() public coldfusion.sql.QueryTable(int ,java.lang.String) public coldfusion.sql.QueryTable(int ,[Ljava.lang.String;) /*** METHODS ***/ ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:257131 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Java and CF
I've written a java class file I want to use in an app (just testing). but I can't figure out where to put my .class file. I tried putting it in the directory with the page calling it, then calling it createobject(java,myclass); But this errored out, not finding the class. So then I placed it in the classpath used according to the cf administrator c:\cfusionmx7\wwwroot\web-inf\lib But the same call fails in the same way, even after restarting cf. I have .jar files installed in the same directory that are working fine (JAI, JPedal, etc.), but my .class file just seems to be ignored. Can anyone give me some insight here? TIA Cutter ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228478 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Java and CF
Check your CF Admin settings regarding the Java Classpath...drop your class in there and cycle CF services...ta da!! You can also add a new classpath via CF admin if the mood strickes you ;-) Cheers Bryan Stevenson B.Comm. VP Director of E-Commerce Development Electric Edge Systems Group Inc. phone: 250.480.0642 fax: 250.480.1264 cell: 250.920.8830 e-mail: [EMAIL PROTECTED] web: www.electricedgesystems.com ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228485 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Java and CF
DOH!I should have read the rest of your thread...my bad...ignore me ;-) It looks like you may have a multi-instance install there so each instance will have a classpathjust can't remember the details right now...but that may shed some light Bryan Stevenson B.Comm. VP Director of E-Commerce Development Electric Edge Systems Group Inc. phone: 250.480.0642 fax: 250.480.1264 cell: 250.920.8830 e-mail: [EMAIL PROTECTED] web: www.electricedgesystems.com ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228487 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Java and CF
Try placing the class file in the folder named classes (not cfclasses - that's where the class file versions of your cf code goes) but classes should be at the same level as lib according to my installation, which is right under WEB-INF. Also make sure that if your java class defines itself as part of a package, that you have the correct folder structure to support a call to that package. (Ex. package com.test.classA in my java source would mean that I need \WEB-INF\classes\com\test\classA.class to be the physical path, and I would instantiate it as such: CreateObject(java, com.test.classA)) Hopefully I have helped and not confused you. :) -Chris I've written a java class file I want to use in an app (just testing). but I can't figure out where to put my .class file. I tried putting it in the directory with the page calling it, then calling it createobject(java,myclass); But this errored out, not finding the class. So then I placed it in the classpath used according to the cf administrator c:\cfusionmx7\wwwroot\web-inf\lib But the same call fails in the same way, even after restarting cf. I have .jar files installed in the same directory that are working fine (JAI, JPedal, etc.), but my .class file just seems to be ignored. Can anyone give me some insight here? TIA Cutter ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228494 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Creating and returning queries from Java to CF
Hello, I have the following problem: I want to create a query object in Java *manually* and return in to CF. Lesser problem is to send a query to Java from CF. I looked all over the web and I was unable to find any example that would explain how to do in java simple things like “queryAddRow() and querySetCell()”. It seems that ResultSet is a read-only object to be used with queries executed against DB only. Also, there is not much on coldfusion.sql.QueryTable and almost nothing on coldfusion.sql.Table. Any help would be appreciated. What I am trying to do is bust performance of my CF page by using Java to do some heavy computation. TK ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:199719 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: translating java to CF
Did that, compiled the jar file now I'm able to create the objects . . . now I have other problems. Is there a list where I can discuss create and update issues? for sforce I keep getting this error: Web service operation create with parameters [EMAIL PROTECTED] could not be found. The error occurred in sfproducts.cfc: line 44 42 : cfelse 43 : cfset sObjects[1] = updateProduct 44 : cfset update_result = this.sfdc.create(sObjects) 45 : /cfif 46 : cfreturn update_result - -Joshua O'Connor-Rose -All is Good --- Sean Corfield [EMAIL PROTECTED] wrote: On Mon, 27 Sep 2004 13:58:46 -0700 (PDT), Joshua OConnor-Rose [EMAIL PROTECTED] wrote: We have not. I have a bunch of generated .java files from the sforce web site and I am suggesting that we just use those. Is that the direction I should take with this? You would need to compile those and put them in CFMX's classpath. Doesn't sforce.com have a precompiled JAR of the objects? Easier to put that on the classpath. Either way, CFMX needs to be able to load the sforce.com objects in order for you to be able to create those objects... -- Sean A Corfield -- http://www.corfield.org/ Team Fusebox -- http://www.fusebox.org/ If you're not annoying somebody, you're not really alive. -- Margaret Atwood ___ Do you Yahoo!? Declare Yourself - Register online to vote today! http://vote.yahoo.com [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
translating java to CF
so if the header in Java says this: - import com.sforce.soap.enterprise.sobject.Account; and then the code does this to create the object: Account account1 = new Account(); - Oh and I'm using SOAP In CF I use cfset this.sfdc = createObject(webservice,arguments.wsdluri) / How can I generate the Account object in CF. And it seems that I can't access the Account object (class?) at all or maybe I'm just being dumb. This doesn't work: cfset accountobj = createObject(java,com.sforce.soap.enterprise.sobject.Account) / I can access the methods of the soap object. com.sforce.soap.enterprise.SoapBindingStub Am I missing something basic? -Joshua O'Connor-Rose -All is Good __ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: translating java to CF
Have you added the compiled Java class files to your CFMX class path? On Mon, 27 Sep 2004 13:21:10 -0700 (PDT), Joshua OConnor-Rose [EMAIL PROTECTED] wrote: so if the header in Java says this: - import com.sforce.soap.enterprise.sobject.Account; and then the code does this to create the object: Account account1 = new Account(); - Oh and I'm using SOAP In CF I use cfset this.sfdc = createObject(webservice,arguments.wsdluri) / How can I generate the Account object in CF. And it seems that I can't access the Account object (class?) at all or maybe I'm just being dumb. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: translating java to CF
Just the guy I wanted to hear from. We have not. I have a bunch of generated .java files from the sforce web site and I am suggesting that we just use those. Is that the direction I should take with this? It seems to me to be the obvious choice. In fact would adding all the generated java files be a good thing? Since I seem to be only having problems with generating the objects. Actualy we are right now fighting with dreamweaver and a proxy generator to look at sforces wsdl file. -Joshua O'Connor-Rose -All is Good --- Sean Corfield [EMAIL PROTECTED] wrote: Have you added the compiled Java class files to your CFMX class path? On Mon, 27 Sep 2004 13:21:10 -0700 (PDT), Joshua OConnor-Rose [EMAIL PROTECTED] wrote: so if the header in Java says this: - import com.sforce.soap.enterprise.sobject.Account; and then the code does this to create the object: Account account1 = new Account(); - Oh and I'm using SOAP In CF I use cfset this.sfdc = createObject(webservice,arguments.wsdluri) / How can I generate the Account object in CF. And it seems that I can't access the Account object (class?) at all or maybe I'm just being dumb. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: translating java to CF
On Mon, 27 Sep 2004 13:58:46 -0700 (PDT), Joshua OConnor-Rose [EMAIL PROTECTED] wrote: We have not. I have a bunch of generated .java files from the sforce web site and I am suggesting that we just use those. Is that the direction I should take with this? You would need to compile those and put them in CFMX's classpath. Doesn't sforce.com have a precompiled JAR of the objects? Easier to put that on the classpath. Either way, CFMX needs to be able to load the sforce.com objects in order for you to be able to create those objects... -- Sean A Corfield -- http://www.corfield.org/ Team Fusebox -- http://www.fusebox.org/ If you're not annoying somebody, you're not really alive. -- Margaret Atwood [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
repost: java to cf
I have written a java class that crawls our site and compiles a list of links. I then populate a cf array from a java method that returns a java vector. The crawling portion(line 4) appears to take a couple of minutes, no surprise. I have to stop the population of the array (line 5) after many minutes. Any suggestions? ideas? code snippet: 1: cfscript 2: pages = ArrayNew(1); 3: crawler = createObject(java,Crawler); 4: crawler.crawl(http://site, http://site, false, 9); // this line seems to take a long time 5: pages = crawler.getVisitedPages(); 6: /cfscript Thanks! Doug James IT Developer MUSC - Hollings Cancer Center http://hcc.musc.edu [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: repost: java to cf
It would help to know what the getVisitedPages() method does in Java. Have you tried calling it from inside a servlet or a JSP file to see if you get the same results? That could at least tell you whether there is a problem between CF and Java or whether the problem is inside the method itself. I have written a java class that crawls our site and compiles a list of links. I then populate a cf array from a java method that returns a java vector. The crawling portion(line 4) appears to take a couple of minutes, no surprise. I have to stop the population of the array (line 5) after many minutes. Any suggestions? ideas? code snippet: 1: cfscript 2: pages = ArrayNew(1); 3: crawler = createObject(java,Crawler); 4: crawler.crawl(http://site, http://site, false, 9); // this line seems to take a long time 5: pages = crawler.getVisitedPages(); 6: /cfscript Thanks! Doug James IT Developer MUSC - Hollings Cancer Center http://hcc.musc.edu [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: repost: java to cf
Doug, What is the purpose of this utility?If I knew that I might be able to better answer this question. You can modify your crawler class to be threaded and to leverage a listener (publish/subscribe pattern).Create a static method in the listener class that will monitor the progress of the crawler.You would them continue much like you are now except that you would create a reference to the listener class (createObject call) and replace line 5 with a loop that polls the static method of the listener and flushes what it reads to the page display. Naturally depending upon what you want to do with the information you will need to be careful about deciding upon destructive vs. non-destructive polling (will there, even remotely, be multiple users that might collide on this task; you'll have to answer that one carefully). Now depending upon the purpose of this utility, you might continue to use some (or all) of the ideas I suggested and use some additional things as well.If the display is merely an administrative report or you want to then proceed to so something that doesn't require direct user interaction, you might have the crawler thread make a http connection to a template when it is done (you could specify this in the constructor or in a config file). The processed data could still be statically held by the listener connected to the crawler instance or, better, a data file somewhere and you could then collect that information. Thus the code snippet you've given below is nothing more than a launcher for the process and it will not leave the user in a waiting state. rish From: Doug James [mailto:[EMAIL PROTECTED] Sent: Thursday, September 23, 2004 3:45 PM To: CF-Talk Subject: repost: java to cf I have written a java class that crawls our site and compiles a list of links. I then populate a cf array from a java method that returns a java vector. The crawling portion(line 4) appears to take a couple of minutes, no surprise. I have to stop the population of the array (line 5) after many minutes. Any suggestions? ideas? code snippet: 1: cfscript 2: pages = ArrayNew(1); 3: crawler = createObject(java,Crawler); 4: crawler.crawl(http://site, http://site, false, 9); // this line seems to take a long time 5: pages = crawler.getVisitedPages(); 6: /cfscript Thanks! Doug James IT Developer MUSC - Hollings Cancer Center http://hcc.musc.edu [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
passing from java to cf
I have written a java class that crawls our site compiles a list of links. I then populate a cf array from a java method that returns a java vector. The crawling portion appears to take a couple of minutes, no surprise, but I am stopping the population of the array after 15 minutes. Any suggestions? ideas? Thanks! Doug code snippet: cfscript pages = ArrayNew(1); crawler = createObject(java,Crawler); crawler.crawl(http://site, http://site, false, 9); // this line seems to take a long time pages = crawler.getVisitedPages(); /cfscript [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Java Import - CF
When you see the following line in a JSP file ... % page language=java import=com.plumtree.remote.portlet.* % ... is there a way to duplicate this functionality in CFMX?Is it possible it import an entire library like this rather than instantiating every class individually with cfobject? Thanks -- Jeff [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: Java Import - CF
Import in Java doesn't instatiate anything, all it does is make a reference used by the compiler to use shorthand access to packages so you don't have to write out the whole package name every time you reference a class in that package. The closest equivalent in CF would be: cfset portlet = com.plumtree.remote.portlet. cfset homePortlet = createObject(java, #portlet#HomePortlet) Sam -- Blog:http://www.rewindlife.com Chart: http://www.blinex.com/products/charting -- -Original Message- From: Jeff Chastain [mailto:[EMAIL PROTECTED] Sent: Friday, September 17, 2004 8:45 AM To: CF-Talk Subject: Java Import - CF When you see the following line in a JSP file ... % page language=java import=com.plumtree.remote.portlet.* % ... is there a way to duplicate this functionality in CFMX?Is it possible it import an entire library like this rather than instantiating every class individually with cfobject? Thanks -- Jeff [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: Java Import - CF
Okay, maybe with some more context, you can help me out with this then.I have the following JSP code that I am attempting to convert to CF. % page language=java import=com.plumtree.remote.portlet.* % % IPortletContext context = PortletContextFactory.createPortletContext(request, response); IPortletUser portletUser = context.getUser(); if ( CommunityAccessLevel.Edit == portletUser.getCurrentCommunityAccessLevel() ) { I have the CF code that handles the first two object declarations (via cfobject).Where I am running into problems is in the IF statement with the 'CommunityAccessLevel.Edit'.There is nothing in the page before this that declares a CommunityAccessLevel object.In reading the documentation for this API, CommunityAccessLevel is a class in the plumtree.remote.portlet namespace that has a static field called Edit. So, how would I translate this into CF? Thanks for your help. -- Jeff _ From: Samuel Neff [mailto:[EMAIL PROTECTED] Sent: Friday, September 17, 2004 8:13 AM To: CF-Talk Subject: RE: Java Import - CF Import in Java doesn't instatiate anything, all it does is make a reference used by the compiler to use shorthand access to packages so you don't have to write out the whole package name every time you reference a class in that package. The closest equivalent in CF would be: cfset portlet = com.plumtree.remote.portlet. cfset homePortlet = createObject(java, #portlet#HomePortlet) Sam -- Blog:http://www.rewindlife.com Chart: http://www.blinex.com/products/charting -- -Original Message- From: Jeff Chastain [mailto:[EMAIL PROTECTED] Sent: Friday, September 17, 2004 8:45 AM To: CF-Talk Subject: Java Import - CF When you see the following line in a JSP file ... % page language=java import=com.plumtree.remote.portlet.* % ... is there a way to duplicate this functionality in CFMX?Is it possible it import an entire library like this rather than instantiating every class individually with cfobject? Thanks -- Jeff _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: Java Import - CF
Okay, I have the terminology figured out a little better now, so lets see if this helps. The JSP page is including a package which apparently instantiates the CommunityAccessLevel class on import.So, in ColdFusion, how can you import a Java package? I could just create a new object based upon this class, I am just not sure that is the best answer. Thanks -- Jeff Quoting Jeff Chastain [EMAIL PROTECTED]: Okay, maybe with some more context, you can help me out with this then.I have the following JSP code that I am attempting to convert to CF. % page language=java import=com.plumtree.remote.portlet.* % % IPortletContext context = PortletContextFactory.createPortletContext(request, response); IPortletUser portletUser = context.getUser(); if ( CommunityAccessLevel.Edit == portletUser.getCurrentCommunityAccessLevel() ) { I have the CF code that handles the first two object declarations (via cfobject).Where I am running into problems is in the IF statement with the 'CommunityAccessLevel.Edit'.There is nothing in the page before this that declares a CommunityAccessLevel object.In reading the documentation for this API, CommunityAccessLevel is a class in the plumtree.remote.portlet namespace that has a static field called Edit. So, how would I translate this into CF? Thanks for your help. -- Jeff _ From: Samuel Neff [mailto:[EMAIL PROTECTED] Sent: Friday, September 17, 2004 8:13 AM To: CF-Talk Subject: RE: Java Import - CF Import in Java doesn't instatiate anything, all it does is make a reference used by the compiler to use shorthand access to packages so you don't have to write out the whole package name every time you reference a class in that package. The closest equivalent in CF would be: cfset portlet = com.plumtree.remote.portlet. cfset homePortlet = createObject(java, #portlet#HomePortlet) Sam -- Blog:http://www.rewindlife.com Chart: http://www.blinex.com/products/charting -- -Original Message- From: Jeff Chastain [mailto:[EMAIL PROTECTED] Sent: Friday, September 17, 2004 8:45 AM To: CF-Talk Subject: Java Import - CF When you see the following line in a JSP file ... % page language=java import=com.plumtree.remote.portlet.* % ... is there a way to duplicate this functionality in CFMX?Is it possible it import an entire library like this rather than instantiating every class individually with cfobject? Thanks -- Jeff _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: Java Import - CF
If you have the package available as a jar you should be able to reference it in the administrator under the classpath settings. Kola -Original Message- From: Jeff Chastain [mailto:[EMAIL PROTECTED] Sent: 17 September 2004 16:07 To: CF-Talk Subject: RE: Java Import - CF Okay, I have the terminology figured out a little better now, so lets see if this helps. The JSP page is including a package which apparently instantiates the CommunityAccessLevel class on import.So, in ColdFusion, how can you import a Java package? I could just create a new object based upon this class, I am just not sure that is the best answer. Thanks -- Jeff Quoting Jeff Chastain [EMAIL PROTECTED]: Okay, maybe with some more context, you can help me out with this then.I have the following JSP code that I am attempting to convert to CF. % page language=java import=com.plumtree.remote.portlet.* % % IPortletContext context = PortletContextFactory.createPortletContext(request, response); IPortletUser portletUser = context.getUser(); if ( CommunityAccessLevel.Edit == portletUser.getCurrentCommunityAccessLevel() ) { I have the CF code that handles the first two object declarations (via cfobject).Where I am running into problems is in the IF statement with the 'CommunityAccessLevel.Edit'.There is nothing in the page before this that declares a CommunityAccessLevel object.In reading the documentation for this API, CommunityAccessLevel is a class in the plumtree.remote.portlet namespace that has a static field called Edit. So, how would I translate this into CF? Thanks for your help. -- Jeff _ From: Samuel Neff [mailto:[EMAIL PROTECTED] Sent: Friday, September 17, 2004 8:13 AM To: CF-Talk Subject: RE: Java Import - CF Import in Java doesn't instatiate anything, all it does is make a reference used by the compiler to use shorthand access to packages so you don't have to write out the whole package name every time you reference a class in that package. The closest equivalent in CF would be: cfset portlet = com.plumtree.remote.portlet. cfset homePortlet = createObject(java, #portlet#HomePortlet) Sam -- Blog:http://www.rewindlife.com Chart: http://www.blinex.com/products/charting -- -Original Message- From: Jeff Chastain [mailto:[EMAIL PROTECTED] Sent: Friday, September 17, 2004 8:45 AM To: CF-Talk Subject: Java Import - CF When you see the following line in a JSP file ... % page language=java import=com.plumtree.remote.portlet.* % ... is there a way to duplicate this functionality in CFMX?Is it possible it import an entire library like this rather than instantiating every class individually with cfobject? Thanks -- Jeff _ _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: Java Import - CF
Well, the com.plumtree.remote.portlet.* namespace is part of a jar that is already referenced in the CF administrator.I have all of that setup. However, it appears that when the package is being imported in JSP, that some constructor or something is being called that instantiates the 'CommunityAccessLevel.Edit' class and static variable automatically.This is what I am trying to duplicate. If I just add the path to the jar file in the Administrator classpath, it is not giving me the same result as the JSP import.So, I need to figure out what the missing piece is between the two. Thanks -- Jeff Quoting Kola Oyedeji [EMAIL PROTECTED]: If you have the package available as a jar you should be able to reference it in the administrator under the classpath settings. Kola -Original Message- From: Jeff Chastain [mailto:[EMAIL PROTECTED] Sent: 17 September 2004 16:07 To: CF-Talk Subject: RE: Java Import - CF Okay, I have the terminology figured out a little better now, so lets see if this helps. The JSP page is including a package which apparently instantiates the CommunityAccessLevel class on import.So, in ColdFusion, how can you import a Java package? I could just create a new object based upon this class, I am just not sure that is the best answer. Thanks -- Jeff Quoting Jeff Chastain [EMAIL PROTECTED]: Okay, maybe with some more context, you can help me out with this then.I have the following JSP code that I am attempting to convert to CF. % page language=java import=com.plumtree.remote.portlet.* % % IPortletContext context = PortletContextFactory.createPortletContext(request, response); IPortletUser portletUser = context.getUser(); if ( CommunityAccessLevel.Edit == portletUser.getCurrentCommunityAccessLevel() ) { I have the CF code that handles the first two object declarations (via cfobject).Where I am running into problems is in the IF statement with the 'CommunityAccessLevel.Edit'.There is nothing in the page before this that declares a CommunityAccessLevel object.In reading the documentation for this API, CommunityAccessLevel is a class in the plumtree.remote.portlet namespace that has a static field called Edit. So, how would I translate this into CF? Thanks for your help. -- Jeff _ From: Samuel Neff [mailto:[EMAIL PROTECTED] Sent: Friday, September 17, 2004 8:13 AM To: CF-Talk Subject: RE: Java Import - CF Import in Java doesn't instatiate anything, all it does is make a reference used by the compiler to use shorthand access to packages so you don't have to write out the whole package name every time you reference a class in that package. The closest equivalent in CF would be: cfset portlet = com.plumtree.remote.portlet. cfset homePortlet = createObject(java, #portlet#HomePortlet) Sam -- Blog:http://www.rewindlife.com Chart: http://www.blinex.com/products/charting -- -Original Message- From: Jeff Chastain [mailto:[EMAIL PROTECTED] Sent: Friday, September 17, 2004 8:45 AM To: CF-Talk Subject: Java Import - CF When you see the following line in a JSP file ... % page language=java import=com.plumtree.remote.portlet.* % ... is there a way to duplicate this functionality in CFMX?Is it possible it import an entire library like this rather than instantiating every class individually with cfobject? Thanks -- Jeff _ _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: Java Import - CF
Okay, a better reply is that it appears that the following JSP package import ... % page language=java import=com.plumtree.remote.portlet.* % ... is actually comparable to ... cfobject action="" type=java class=com.plumtree.remote.portlet.AggregationMode name=AggregationMode cfobject action="" type=java class=com.plumtree.remote.portlet.CommunityAccessLevel name=CommunityAccessLevel cfobject action="" type=java class=com.plumtree.remote.portlet.HostedDisplayMode name=HostedDisplayMode ... etc. for all 15 classes in this package. So, is there a simpler way to do this?It would be ideal, as it is in JSP, to have all of the objects already created and ready to use without having to perform N cfobject calls at the top of a template. Thanks - Jeff Quoting Kola Oyedeji [EMAIL PROTECTED]: If you have the package available as a jar you should be able to reference it in the administrator under the classpath settings. Kola - This mail sent through IMP: http://horde.org/imp/ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: Java Import - CF
Jeff AFAIK there is no way to do this in CF, you're stuck with using create object. KOla -Original Message- From: Jeff Chastain [mailto:[EMAIL PROTECTED] Sent: 17 September 2004 17:19 To: CF-Talk Subject: RE: Java Import - CF Okay, a better reply is that it appears that the following JSP package import ... % page language=java import=com.plumtree.remote.portlet.* % ... is actually comparable to ... cfobject action="" type=java class=com.plumtree.remote.portlet.AggregationMode name=AggregationMode cfobject action="" type=java class=com.plumtree.remote.portlet.CommunityAccessLevel name=CommunityAccessLevel cfobject action="" type=java class=com.plumtree.remote.portlet.HostedDisplayMode name=HostedDisplayMode ... etc. for all 15 classes in this package. So, is there a simpler way to do this?It would be ideal, as it is in JSP, to have all of the objects already created and ready to use without having to perform N cfobject calls at the top of a template. Thanks - Jeff Quoting Kola Oyedeji [EMAIL PROTECTED]: If you have the package available as a jar you should be able to reference it in the administrator under the classpath settings. Kola - This mail sent through IMP: http://horde.org/imp/ _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: Java Import - CF
That is what I was afraid of, but it was worth asking.Thanks for your help. -- Jeff Quoting Kola Oyedeji [EMAIL PROTECTED]: Jeff AFAIK there is no way to do this in CF, you're stuck with using create object. KOla -Original Message- From: Jeff Chastain [mailto:[EMAIL PROTECTED] Sent: 17 September 2004 17:19 To: CF-Talk Subject: RE: Java Import - CF Okay, a better reply is that it appears that the following JSP package import ... % page language=java import=com.plumtree.remote.portlet.* % ... is actually comparable to ... cfobject action="" type=java class=com.plumtree.remote.portlet.AggregationMode name=AggregationMode cfobject action="" type=java class=com.plumtree.remote.portlet.CommunityAccessLevel name=CommunityAccessLevel cfobject action="" type=java class=com.plumtree.remote.portlet.HostedDisplayMode name=HostedDisplayMode ... etc. for all 15 classes in this package. So, is there a simpler way to do this?It would be ideal, as it is in JSP, to have all of the objects already created and ready to use without having to perform N cfobject calls at the top of a template. Thanks - Jeff Quoting Kola Oyedeji [EMAIL PROTECTED]: If you have the package available as a jar you should be able to reference it in the administrator under the classpath settings. Kola - This mail sent through IMP: http://horde.org/imp/ _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Hal Helms Java For CF Developers class?
Is there anyone on the list that has attended any of Hal Helms' training classes?I am interested in his Java For CF Developers but would like feedback from anyone who has taken it or any of his other classes. Also, the only contact info on his web site is an email address and so far I am unable to get him to respond.My employer (who is paying the tab) is starting to wonder if this training is legitimate because no one gets back to us with our questions.Does anyone know how to reach him?I know he posts here sometimes--are you out there Hal? Chris [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: Upload a file using Java in CF
On Thursday 17 Jun 2004 16:34 pm, Andrew Spear wrote: InputStreamReader/InputStreamWriter classes, but I'm pretty clueless as to where to start. http://java.sun.com/j2se/1.4.2/docs/api/ ? -- Tom Chiverton Advanced ColdFusion Programmer Tel: +44(0)1749 834997 email: [EMAIL PROTECTED] BlueFinger Limited Underwood Business Park Wookey Hole Road, WELLS. BA5 1AF Tel: +44 (0)1749 834900 Fax: +44 (0)1749 834901 web: www.bluefinger.com Company Reg No: 4209395 Registered Office: 2 Temple Back East, Temple Quay, BRISTOL. BS1 6EG. *** This E-mail contains confidential information for the addressee only. If you are not the intended recipient, please notify us immediately. You should not use, disclose, distribute or copy this communication if received in error. No binding contract will result from this e-mail until such time as a written document is signed on behalf of the company. BlueFinger Limited cannot accept responsibility for the completeness or accuracy of this message as it has been transmitted over public networks.*** [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: Upload a file using Java in CF
Andrew Spear [EMAIL PROTECTED] wrote: Sorry if this is a bit OT.I have a file upload form that posts to the code below. The code takes the uploaded file and writes it to the server. snip umm.. sorry, could I just ask, what's the advantage of doing this over using CFFILE? Or is it for servers with CFFILE disabled? -- Kay Smoljak http://kay.smoljak.com [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: Upload a file using Java in CF
Kay Smoljak wrote: Andrew Spear [EMAIL PROTECTED] wrote: Sorry if this is a bit OT.I have a file upload form that posts to the code below. The code takes the uploaded file and writes it to the server. snip umm.. sorry, could I just ask, what's the advantage of doing this over using CFFILE? Or is it for servers with CFFILE disabled? ummm yeah... and if cffile is disabled I would definately expect cfobject to be disabled too. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: Upload a file using Java in CF
Well, here's my situation.We have a sandbox for some developers who need cffile, but we (the admins) have a requirement to log all file activity.The solution is to create a custom tag that contains the cffile functionality plus contains a logging facility so we can track what they are doing.Now, it would be perfect if I could just wrap up cffile in my own custom tag, but the sandbox security still recognizes that cffile is be run and shuts us down.So I figured I would need to use Java.If anyone has any ideas on how to get cffile to run in a custom tag within a sandbox that has cffile disabled, I would appreciate them.CF 5 used to have an unrestricted tag folder, but it doesn't look like MX does.Oh well. Thanks- Andrew [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Upload a file using Java in CF
Sorry if this is a bit OT.I have a file upload form that posts to the code below.The code takes the uploaded file and writes it to the server.The only problem is that it only works with text files.It will write any file, but types like Word docs won't open.I'm pretty sure the problem is that I'm using the FileReader/FileWriter classes, which only work for character files.I think I should be using the InputStreamReader/InputStreamWriter classes, but I'm pretty clueless as to where to start. And just so I don't get accused of plagiarism, I modified this code from someones blog (I forget who though). cfscript s = ; cls = s.getClass(); stringClass = cls.forName(java.lang.String); fileReaderClass = cls.forName(java.io.FileReader); fileWriterClass = cls.forName(java.io.FileWriter); a = arrayNew(1); a[1] = stringClass; b = arrayNew(1); b[1] = stringClass; fileReaderConst = fileReaderClass.getConstructor(a); fileWriterConst = fileWriterClass.getConstructor(b); a[1] = form.upFile; b[1] = form.path; fileReader = fileReaderConst.newInstance(a); fileWriter = fileWriterConst.newInstance(b); readerClass = cls.forName(java.io.Reader); a[1] = readerClass; bufferedReaderClass = cls.forName(java.io.BufferedReader); bufferedReaderConst = bufferedReaderClass.getConstructor(a); a[1] = fileReader; bufferedReader = bufferedReaderConst.newInstance(a); try { do { s = bufferedReader.readLine(); fileWriter.write(s); } while (true); } catch (coldfusion.runtime.UndefinedVariableException e) { // this indicates end of file, ok to ignore error } fileWriter.close(); /cfscript [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Java and CF
Hi All, We have numerous clients that we have developed sites for where there has been times when a java solution may have been easier then what we did but they are all in shared hosting environments.Is there any way to write java classes, compile them and place them in the clients webroot, and call them without the class being in CF's classpath? Trevor Holm-Laursen eBusiness Developer, FCS Direct:(902)463-5953 FCS (Fundy Computer Services Ltd.) Tel 877-993-8636 Fax 902-484-5887 Email:[EMAIL PROTECTED] Website:http://www.fcs.ca [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Java and CF
Trevor, Custom class loader.Use a custom class loader with the factory pattern to instantiate all of the Java classes.It means you'll only ever use the createObject once - to load the custom class loader/factor.After that you use the factory's create method to load a Java class. You can get a start on it here: http://www.sys-con.com/coldfusion/article.cfm?id=278 rish -Original Message- From: Trevor Holm-Laursen [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 2:20 PM To: CF-Talk Subject: Java and CF Hi All, We have numerous clients that we have developed sites for where there has been times when a java solution may have been easier then what we did but they are all in shared hosting environments.Is there any way to write java classes, compile them and place them in the clients webroot, and call them without the class being in CF's classpath? Trevor Holm-Laursen eBusiness Developer, FCS Direct:(902)463-5953 FCS (Fundy Computer Services Ltd.) Tel 877-993-8636 Fax 902-484-5887 Email:[EMAIL PROTECTED] Website:http://www.fcs.ca [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
[sot] simple java webservice / cf....
oi CF-Talk!! so if this is a java class file i have. which works fine. TempConverter.java - public class TempConverter { public static void main(String [] args) { double F = Double.parseDouble(args[0]); double C = (5.0/9.0) * (F - 32); System.out.println(F + degrees Fahrenheit = + C + degrees Celcius); } } this is TempConverter.jws -- public class TempConverter { public double FtoC(String str) { double F = Double.parseDouble(str); double C; C = (5 / 9) * (F - 32); return C; } } but when i run this. index.cfm --- cfscript objTempConverter = createObject(webservice,http://localhost/java_webservice/TempConverter.jws?wsdl); celsius = objTempConverter.FtoC(32); writeoutput(celsius); /cfscript I get this error Could not perform web service invocation FtoC because java.lang.IllegalArgumentException: argument type mismatch any ideas?? /critz -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-[ Ctz Consulting ]-= =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-[ http://ctzconsulting.com ]-= --- [This E-mail scanned for viruses by Declude Virus] [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: JSP/Java in CF Page
There was no reason no following that approach. Its perfect and does what I want. Thanks -Original Message- From: Paul Hastings [mailto:[EMAIL PROTECTED] Sent: 08 July 2003 18:33 To: CF-Talk Subject: Re: JSP/Java in CF Page First time writing Java/JSP code in CF. What should be the syntax to include this java file in cf page and print results. is there any reason for not taking this approach? cfscript aSimpleDateFormat = createObject(java, java.text.SimpleDateFormat); millseconds = javaCast(double,1057580739 * 1000); thisDateMask=javaCast(string,/MM/dd HH:mm:ss); thisDate=aSimpleDateFormat.init(thisDateMask).format(millseconds); writeoutput(#thisDate#); /cfscript ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. http://www.cfhosting.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
JSP/Java in CF Page
Hi First time writing Java/JSP code in CF. What should be the syntax to include this java file in cf page and print results. %@ import java.text.SimpleDateFormat;% %@ import java.util.*;% % public class formatDate{ public static void main(String args[]) { String seconds = args[0]; long secs = Integer.parseInt(1057580739); long millseconds = secs * 1000; Date dateObj = new Date(millseconds); SimpleDateFormat sdf = new SimpleDateFormat(/MM/dd HH:mm:ss); String formattedDate = sdf.format(dateObj); System.out.println(formattedDate); } } % Shaz ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: JSP/Java in CF Page
CFSCRIPT GetPageContext().include(hello.jsp); /CFSCRIPT Full details here... http://www.macromedia.com/devnet/mx/coldfusion/articles/java.html WG -Original Message- From: Shahzad.Butt [mailto:[EMAIL PROTECTED] Sent: 08 July 2003 10:14 To: CF-Talk Subject: JSP/Java in CF Page Hi First time writing Java/JSP code in CF. What should be the syntax to include this java file in cf page and print results. %@ import java.text.SimpleDateFormat;% %@ import java.util.*;% % public class formatDate{ public static void main(String args[]) { String seconds = args[0]; long secs = Integer.parseInt(1057580739); long millseconds = secs * 1000; Date dateObj = new Date(millseconds); SimpleDateFormat sdf = new SimpleDateFormat(/MM/dd HH:mm:ss); String formattedDate = sdf.format(dateObj); System.out.println(formattedDate); } } % Shaz ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=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
RE: JSP/Java in CF Page
Getting this error \u201cUTCDate, on line 9, column 31, is not a valid identifer name. The CFML compiler was processing: an expression beginning with \u201cUTCDate.jsp\u201d, on line 9, column 31.This message is usually caused by a problem in the expressions structure. an expression beginning with GetPageContext, on line 9, column 6.This message is usually caused by a problem in the expressions structure. a script statement beginning with GetPageContext on line 9, column 6. a CFSCRIPT tag beginning on line 8, column 2. The error occurred in C:\Test\UTC.cfm: line 9 7 : body 8 : CFSCRIPT 9 : GetPageContext().include(UTCDate.jsp); 10 : /CFSCRIPT -Original Message- From: webguy [mailto:[EMAIL PROTECTED] Sent: 08 July 2003 11:46 To: CF-Talk Subject: RE: JSP/Java in CF Page CFSCRIPT GetPageContext().include(hello.jsp); /CFSCRIPT Full details here... http://www.macromedia.com/devnet/mx/coldfusion/articles/java.html WG -Original Message- From: Shahzad.Butt [mailto:[EMAIL PROTECTED] Sent: 08 July 2003 10:14 To: CF-Talk Subject: JSP/Java in CF Page Hi First time writing Java/JSP code in CF. What should be the syntax to include this java file in cf page and print results. %@ import java.text.SimpleDateFormat;% %@ import java.util.*;% % public class formatDate{ public static void main(String args[]) { String seconds = args[0]; long secs = Integer.parseInt(1057580739); long millseconds = secs * 1000; Date dateObj = new Date(millseconds); SimpleDateFormat sdf = new SimpleDateFormat(/MM/dd HH:mm:ss); String formattedDate = sdf.format(dateObj); System.out.println(formattedDate); } } % Shaz ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: JSP/Java in CF Page
Looks like a unicode issue, what encoding are you using ? WG -Original Message- From: Shahzad.Butt [mailto:[EMAIL PROTECTED] Sent: 08 July 2003 13:10 To: CF-Talk Subject: RE: JSP/Java in CF Page Getting this error \u201cUTCDate, on line 9, column 31, is not a valid identifer name. The CFML compiler was processing: an expression beginning with \u201cUTCDate.jsp\u201d, on line 9, column 31.This message is usually caused by a problem in the expressions structure. an expression beginning with GetPageContext, on line 9, column 6.This message is usually caused by a problem in the expressions structure. a script statement beginning with GetPageContext on line 9, column 6. a CFSCRIPT tag beginning on line 8, column 2. The error occurred in C:\Test\UTC.cfm: line 9 7 : body 8 : CFSCRIPT 9 : GetPageContext().include(UTCDate.jsp); 10 : /CFSCRIPT -Original Message- From: webguy [mailto:[EMAIL PROTECTED] Sent: 08 July 2003 11:46 To: CF-Talk Subject: RE: JSP/Java in CF Page CFSCRIPT GetPageContext().include(hello.jsp); /CFSCRIPT Full details here... http://www.macromedia.com/devnet/mx/coldfusion/articles/java.html WG -Original Message- From: Shahzad.Butt [mailto:[EMAIL PROTECTED] Sent: 08 July 2003 10:14 To: CF-Talk Subject: JSP/Java in CF Page Hi First time writing Java/JSP code in CF. What should be the syntax to include this java file in cf page and print results. %@ import java.text.SimpleDateFormat;% %@ import java.util.*;% % public class formatDate{ public static void main(String args[]) { String seconds = args[0]; long secs = Integer.parseInt(1057580739); long millseconds = secs * 1000; Date dateObj = new Date(millseconds); SimpleDateFormat sdf = new SimpleDateFormat(/MM/dd HH:mm:ss); String formattedDate = sdf.format(dateObj); System.out.println(formattedDate); } } % Shaz ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: JSP/Java in CF Page
Default in Dreamweaver charset=iso-8859-1 I guess. -Original Message- From: webguy [mailto:[EMAIL PROTECTED] Sent: 08 July 2003 13:23 To: CF-Talk Subject: RE: JSP/Java in CF Page Looks like a unicode issue, what encoding are you using ? WG -Original Message- From: Shahzad.Butt [mailto:[EMAIL PROTECTED] Sent: 08 July 2003 13:10 To: CF-Talk Subject: RE: JSP/Java in CF Page Getting this error \u201cUTCDate, on line 9, column 31, is not a valid identifer name. The CFML compiler was processing: an expression beginning with \u201cUTCDate.jsp\u201d, on line 9, column 31.This message is usually caused by a problem in the expressions structure. an expression beginning with GetPageContext, on line 9, column 6.This message is usually caused by a problem in the expressions structure. a script statement beginning with GetPageContext on line 9, column 6. a CFSCRIPT tag beginning on line 8, column 2. The error occurred in C:\Test\UTC.cfm: line 9 7 : body 8 : CFSCRIPT 9 : GetPageContext().include(UTCDate.jsp); 10 : /CFSCRIPT -Original Message- From: webguy [mailto:[EMAIL PROTECTED] Sent: 08 July 2003 11:46 To: CF-Talk Subject: RE: JSP/Java in CF Page CFSCRIPT GetPageContext().include(hello.jsp); /CFSCRIPT Full details here... http://www.macromedia.com/devnet/mx/coldfusion/articles/java.html WG -Original Message- From: Shahzad.Butt [mailto:[EMAIL PROTECTED] Sent: 08 July 2003 10:14 To: CF-Talk Subject: JSP/Java in CF Page Hi First time writing Java/JSP code in CF. What should be the syntax to include this java file in cf page and print results. %@ import java.text.SimpleDateFormat;% %@ import java.util.*;% % public class formatDate{ public static void main(String args[]) { String seconds = args[0]; long secs = Integer.parseInt(1057580739); long millseconds = secs * 1000; Date dateObj = new Date(millseconds); SimpleDateFormat sdf = new SimpleDateFormat(/MM/dd HH:mm:ss); String formattedDate = sdf.format(dateObj); System.out.println(formattedDate); } } % Shaz ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. http://www.cfhosting.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: JSP/Java in CF Page
\u201C is comma quotation mark, double turned in unicode. Maybe try this at the top of the page. cfprocessingdirective encoding=utf-8 don't know anything about Dreamweaver -Original Message- From: Shahzad.Butt [mailto:[EMAIL PROTECTED] Sent: 08 July 2003 13:30 To: CF-Talk Subject: RE: JSP/Java in CF Page Default in Dreamweaver charset=iso-8859-1 I guess. -Original Message- From: webguy [mailto:[EMAIL PROTECTED] Sent: 08 July 2003 13:23 To: CF-Talk Subject: RE: JSP/Java in CF Page Looks like a unicode issue, what encoding are you using ? WG -Original Message- From: Shahzad.Butt [mailto:[EMAIL PROTECTED] Sent: 08 July 2003 13:10 To: CF-Talk Subject: RE: JSP/Java in CF Page Getting this error \u201cUTCDate, on line 9, column 31, is not a valid identifer name. The CFML compiler was processing: an expression beginning with \u201cUTCDate.jsp\u201d, on line 9, column 31.This message is usually caused by a problem in the expressions structure. an expression beginning with GetPageContext, on line 9, column 6.This message is usually caused by a problem in the expressions structure. a script statement beginning with GetPageContext on line 9, column 6. a CFSCRIPT tag beginning on line 8, column 2. The error occurred in C:\Test\UTC.cfm: line 9 7 : body 8 : CFSCRIPT 9 : GetPageContext().include(UTCDate.jsp); 10 : /CFSCRIPT -Original Message- From: webguy [mailto:[EMAIL PROTECTED] Sent: 08 July 2003 11:46 To: CF-Talk Subject: RE: JSP/Java in CF Page CFSCRIPT GetPageContext().include(hello.jsp); /CFSCRIPT Full details here... http://www.macromedia.com/devnet/mx/coldfusion/articles/java.html WG -Original Message- From: Shahzad.Butt [mailto:[EMAIL PROTECTED] Sent: 08 July 2003 10:14 To: CF-Talk Subject: JSP/Java in CF Page Hi First time writing Java/JSP code in CF. What should be the syntax to include this java file in cf page and print results. %@ import java.text.SimpleDateFormat;% %@ import java.util.*;% % public class formatDate{ public static void main(String args[]) { String seconds = args[0]; long secs = Integer.parseInt(1057580739); long millseconds = secs * 1000; Date dateObj = new Date(millseconds); SimpleDateFormat sdf = new SimpleDateFormat(/MM/dd HH:mm:ss); String formattedDate = sdf.format(dateObj); System.out.println(formattedDate); } } % Shaz ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=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
RE: JSP/Java in CF Page
You'd be better compiling the java to a class file, it's failry easy. I posted this for tony yesterday after a suggestion made by webguy, should be a final version, nice and quick and lets you specify the dates' format. The formats are java and can be found at http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html Save the following as formatSecondsSinceEpoch.java ,compile it (javac formatSecondsSinceEpoch.java) which should give you a formatSecondsSinceEpoch.class file, stick this somewhere in CFMX's class path and your'e good to go. You will of course need to download the JDK from java.sun.com --- import java.text.SimpleDateFormat; import java.util.*; public class formatSecondsSinceEpoch{ String seconds; String format; public final String formatDate(String seconds, String format){ long secs = Integer.parseInt(seconds); long millseconds = secs * 1000; Date dateObj = new Date(millseconds); SimpleDateFormat sdf = new SimpleDateFormat(format); // String formattedDate = sdf.format(dateObj); return formattedDate; } } --- cfscript seconds = 1057580739; format = /MM/dd HH:mm:ss; mydate = createobject('java','formatSecondsSinceEpoch'); ret = mydate.formatDate(seconds,format); /cfscript cfoutput#ret#/cfoutput cfloop from=1 to=500 index=i cfset seconds = seconds + 1 cfset ret = mydate.formatDate(JavaCast(String,seconds),format) !--- Need to pass in strings, so use JavaCast on the seconds if they are ints --- cfoutput#ret#/cfoutputbr /cfloop --- -Original Message- From: Shahzad.Butt [mailto:[EMAIL PROTECTED] Sent: 08 July 2003 13:30 To: CF-Talk Subject: RE: JSP/Java in CF Page Default in Dreamweaver charset=iso-8859-1 I guess. -Original Message- From: webguy [mailto:[EMAIL PROTECTED] Sent: 08 July 2003 13:23 To: CF-Talk Subject: RE: JSP/Java in CF Page Looks like a unicode issue, what encoding are you using ? WG -Original Message- From: Shahzad.Butt [mailto:[EMAIL PROTECTED] Sent: 08 July 2003 13:10 To: CF-Talk Subject: RE: JSP/Java in CF Page Getting this error \u201cUTCDate, on line 9, column 31, is not a valid identifer name. The CFML compiler was processing: an expression beginning with \u201cUTCDate.jsp\u201d, on line 9, column 31.This message is usually caused by a problem in the expressions structure. an expression beginning with GetPageContext, on line 9, column 6.This message is usually caused by a problem in the expressions structure. a script statement beginning with GetPageContext on line 9, column 6. a CFSCRIPT tag beginning on line 8, column 2. The error occurred in C:\Test\UTC.cfm: line 9 7 : body 8 : CFSCRIPT 9 : GetPageContext().include(UTCDate.jsp); 10 : /CFSCRIPT -Original Message- From: webguy [mailto:[EMAIL PROTECTED] Sent: 08 July 2003 11:46 To: CF-Talk Subject: RE: JSP/Java in CF Page CFSCRIPT GetPageContext().include(hello.jsp); /CFSCRIPT Full details here... http://www.macromedia.com/devnet/mx/coldfusion/articles/java.html WG -Original Message- From: Shahzad.Butt [mailto:[EMAIL PROTECTED] Sent: 08 July 2003 10:14 To: CF-Talk Subject: JSP/Java in CF Page Hi First time writing Java/JSP code in CF. What should be the syntax to include this java file in cf page and print results. %@ import java.text.SimpleDateFormat;% %@ import java.util.*;% % public class formatDate{ public static void main(String args[]) { String seconds = args[0]; long secs = Integer.parseInt(1057580739); long millseconds = secs * 1000; Date dateObj = new Date(millseconds); SimpleDateFormat sdf = new SimpleDateFormat(/MM/dd HH:mm:ss); String formattedDate = sdf.format(dateObj); System.out.println(formattedDate); } } % Shaz ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: JSP/Java in CF Page
First time writing Java/JSP code in CF. What should be the syntax to include this java file in cf page and print results. is there any reason for not taking this approach? cfscript aSimpleDateFormat = createObject(java, java.text.SimpleDateFormat); millseconds = javaCast(double,1057580739 * 1000); thisDateMask=javaCast(string,/MM/dd HH:mm:ss); thisDate=aSimpleDateFormat.init(thisDateMask).format(millseconds); writeoutput(#thisDate#); /cfscript ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Java in CF (CFMX) - MM Drivers
MM-Product Team... When Vernon Viehe(MM Community manager) exited.. there were promises from MM..that MM would provide better support through other MM Folks... *Is this a JOKE?* Vernon did a much better job..than whoever is in that place now. This Thread Question was directed to MM..since there is no DOCUMENTATION on details of drivers and such.. NEVER Got an Answer.! CFMX Updater 2 Release Notes... DB2-Specific Issues An exception could be generated when connecting to DB2 AS/400 v4R5. 15002962(ID). ***STILL DOING THE SAME THING with V4R5 and V5R1*** Is MM(Product-Team) going to provide the documentation details.. or do we have to wait another year.. for a reponse...? BTW.. This Thread is dating back early last Month. Joe On Mon, 09 Dec 2002 07:20:57 -0800 Joe Eugene [EMAIL PROTECTED] wrote: Phil/MM Product Team All the drivers are from DataDirect/Merant except for the mySQL driver. Are you sure about the above? What Java Type IV driver is provided with CFMX for DB2 UDB? This? http://www.datadirect-technologies.com/products/jdbc/jdbcrelhighlights.asp The above driver supports DB2 UDB for AS400(iSeries) for V5R4 and V5R1 OS Versions. I havent been able to configure this connection with CFMX..(got a Native JTOpen connection working) and i dont think AS400 DB2 UDB is supported Can you give some documentation on exactly what drivers CMFX uses(Author/Versions)? It would be very helpful to see some documentation on implementation of CFQUERY and how connection pooling works in CFMX. Thanks Joe On Mon, 9 Dec 2002 08:43:38 -0500 Phil Costa wrote: Better late than never ;-) All the drivers are from DataDirect/Merant except for the mySQL driver. I believe a third-party JDBC driver would be managed just like one of the drivers included with CFMX, but I have to verify that. Phil -Original Message- From: Joe Eugene [mailto:[EMAIL PROTECTED]] Sent: Saturday, December 07, 2002 11:01 PM To: CF-Talk Subject: RE: Java in CF (CFMX) - MM Drivers Anybody from MM Product Team can explain this? on November 24, 2002 5:24 PM Product Teams reply 2 weeks later on the Thread!. Talked to Sean and figured out this already. Anyways since you mentioned it, Are all CFMX Native Drivers DataDirect Drivers(Oracle,DB2 UDB). If you configure a Type IV Native Datasource in CMFX... Does CFMX manage connection pooling? Single Connection.. Multiple Statements? How does this work? Thanks Joe -Original Message- From: Phil Costa [mailto:[EMAIL PROTECTED]] Sent: Friday, December 06, 2002 4:49 PM To: CF-Talk Subject: RE: Java in CF (CFMX) - MM Drivers It's throwing that error because you're trying to access the JDBC drivers in an unlicensed fashion. The DataDirect drivers are licensed for use with ColdFusion, which includes support for JSP as well as CFML, not the scenario you're describing. Phil Costa Sr. Product Manager, ColdFusion Macromedia -Original Message- From: Joe Eugene [mailto:[EMAIL PROTECTED]] Sent: Sunday, November 24, 2002 5:24 PM To: CF-Talk Subject: RE: Java in CF (CFMX) - MM Drivers I got this partially resolved... Sean helped out.. Thanks Sean. It was a classpath problem. However after i load the drivers(macromedia.jdbc.MacromediaDriver) which is in the lib directory of your installation(eg. G:\CFusionMX\lib\macromedia_drivers.jar) and give it the connection url.. Connection con = DriverManager.getConnection(jdbc:macromedia:sqlserver://SqlServerName:1433 ,userid,Pwd); I get an Exception.. macromedia.jdbc.MacromediaDriver$InvalidLicenseException: An Enterprise license is needed to use the Macromedia JDBC Drivers on the DB2, Oracle, Sybase and Info rmix servers. I am running CFMX Enterprise version(6,0,0,48097). I have the same connection working fine in JSP Pages under CFMX. Are CFMX Enterprise drivers protected from usage in Java Applications(Console/Swing)? Anybody from MM Product Team can explain this? Joe -Original Message- From: Joe Eugene [mailto:[EMAIL PROTECTED]] Sent: Friday, November 22, 2002 4:11 PM To: CF-Talk Subject: RE: Java in CF (CFMX) - MM Drivers I can use the CFMX MM DB drivers in a JSP page..No problem. however.. i need to use it in a Java Application..tried to load the Driver.. Class.forName(macromedia.jdbc.MacromediaDriver) Keep getting ClassNotFound Error.. I put the macromedia_driver.jar in the class path.. still not loading.. Do i need to import something? What am i missing? Joe PS:Old Thread. I am just catching up on this Thread.. Isnt the idea to comply with J2EE Architecture? Model-View-Controller model etc.. Why would some want to write in-line Java..? Anyways... On Fri, 22 Nov 2002 09:09:16 -0500
RE: Java in CF (CFMX) - MM Drivers
If you have a question that is directed directly to Macromedia then you need to contact Macromedia directly. That means either contacting support, or sending your question to me. At the least CC us on your post. Otherwise, there is a chance we might not see your original question, or a follow up. We spend a lot of time helping people out on this list. Most of the people from Macromedia who are on the list and help people out are not here because they have to be, but because they love and are dedicated to the product and community. However, again, if you need direct support from Macromedia, then you need to contact us directly. We have processes and channels setup to provide the type of 1 on 1 support /communication that you appear to be looking for. Again, please feel to email me directly with any questions that you have that are addressed to the macromedia in general, or the CF Team in particular. btw, this should not be taken to mean that we will not continue to be active on the list helping people out. It just means that with the high volume of messages on the list, we miss questions / topics sometimes. mike chambers [EMAIL PROTECTED] -Original Message- From: Joe Eugene [mailto:[EMAIL PROTECTED]] Sent: Friday, December 13, 2002 12:49 PM To: CF-Talk Subject: RE: Java in CF (CFMX) - MM Drivers MM-Product Team... When Vernon Viehe(MM Community manager) exited.. there were promises from MM..that MM would provide better support through other MM Folks... *Is this a JOKE?* Vernon did a much better job..than whoever is in that place now. This Thread Question was directed to MM..since there is no DOCUMENTATION on details of drivers and such.. NEVER Got an Answer.! CFMX Updater 2 Release Notes... DB2-Specific Issues An exception could be generated when connecting to DB2 AS/400 v4R5. 15002962(ID). ***STILL DOING THE SAME THING with V4R5 and V5R1*** Is MM(Product-Team) going to provide the documentation details.. or do we have to wait another year.. for a reponse...? BTW.. This Thread is dating back early last Month. Joe On Mon, 09 Dec 2002 07:20:57 -0800 Joe Eugene [EMAIL PROTECTED] wrote: Phil/MM Product Team All the drivers are from DataDirect/Merant except for the mySQL driver. Are you sure about the above? What Java Type IV driver is provided with CFMX for DB2 UDB? This? http://www.datadirect-technologies.com/products/jdbc/jdbcrelhi ghlights.asp The above driver supports DB2 UDB for AS400(iSeries) for V5R4 and V5R1 OS Versions. I havent been able to configure this connection with CFMX..(got a Native JTOpen connection working) and i dont think AS400 DB2 UDB is supported Can you give some documentation on exactly what drivers CMFX uses(Author/Versions)? It would be very helpful to see some documentation on implementation of CFQUERY and how connection pooling works in CFMX. Thanks Joe On Mon, 9 Dec 2002 08:43:38 -0500 Phil Costa wrote: Better late than never ;-) All the drivers are from DataDirect/Merant except for the mySQL driver. I believe a third-party JDBC driver would be managed just like one of the drivers included with CFMX, but I have to verify that. Phil -Original Message- From: Joe Eugene [mailto:[EMAIL PROTECTED]] Sent: Saturday, December 07, 2002 11:01 PM To: CF-Talk Subject: RE: Java in CF (CFMX) - MM Drivers Anybody from MM Product Team can explain this? on November 24, 2002 5:24 PM Product Teams reply 2 weeks later on the Thread!. Talked to Sean and figured out this already. Anyways since you mentioned it, Are all CFMX Native Drivers DataDirect Drivers(Oracle,DB2 UDB). If you configure a Type IV Native Datasource in CMFX... Does CFMX manage connection pooling? Single Connection.. Multiple Statements? How does this work? Thanks Joe -Original Message- From: Phil Costa [mailto:[EMAIL PROTECTED]] Sent: Friday, December 06, 2002 4:49 PM To: CF-Talk Subject: RE: Java in CF (CFMX) - MM Drivers It's throwing that error because you're trying to access the JDBC drivers in an unlicensed fashion. The DataDirect drivers are licensed for use with ColdFusion, which includes support for JSP as well as CFML, not the scenario you're describing. Phil Costa Sr. Product Manager, ColdFusion Macromedia -Original Message- From: Joe Eugene [mailto:[EMAIL PROTECTED]] Sent: Sunday, November 24, 2002 5:24 PM To: CF-Talk Subject: RE: Java in CF (CFMX) - MM Drivers I got this partially resolved... Sean helped out.. Thanks Sean. It was a classpath problem. However after i load the drivers(macromedia.jdbc.MacromediaDriver) which is in the lib directory of your installation(eg. G:\CFusionMX\lib
RE: Java in CF (CFMX) - MM Drivers
Better late than never ;-) All the drivers are from DataDirect/Merant except for the mySQL driver. I believe a third-party JDBC driver would be managed just like one of the drivers included with CFMX, but I have to verify that. Phil -Original Message- From: Joe Eugene [mailto:[EMAIL PROTECTED]] Sent: Saturday, December 07, 2002 11:01 PM To: CF-Talk Subject: RE: Java in CF (CFMX) - MM Drivers Anybody from MM Product Team can explain this? on November 24, 2002 5:24 PM Product Teams reply 2 weeks later on the Thread!. Talked to Sean and figured out this already. Anyways since you mentioned it, Are all CFMX Native Drivers DataDirect Drivers(Oracle,DB2 UDB). If you configure a Type IV Native Datasource in CMFX... Does CFMX manage connection pooling? Single Connection.. Multiple Statements? How does this work? Thanks Joe -Original Message- From: Phil Costa [mailto:[EMAIL PROTECTED]] Sent: Friday, December 06, 2002 4:49 PM To: CF-Talk Subject: RE: Java in CF (CFMX) - MM Drivers It's throwing that error because you're trying to access the JDBC drivers in an unlicensed fashion. The DataDirect drivers are licensed for use with ColdFusion, which includes support for JSP as well as CFML, not the scenario you're describing. Phil Costa Sr. Product Manager, ColdFusion Macromedia -Original Message- From: Joe Eugene [mailto:[EMAIL PROTECTED]] Sent: Sunday, November 24, 2002 5:24 PM To: CF-Talk Subject: RE: Java in CF (CFMX) - MM Drivers I got this partially resolved... Sean helped out.. Thanks Sean. It was a classpath problem. However after i load the drivers(macromedia.jdbc.MacromediaDriver) which is in the lib directory of your installation(eg. G:\CFusionMX\lib\macromedia_drivers.jar) and give it the connection url.. Connection con = DriverManager.getConnection(jdbc:macromedia:sqlserver://SqlServerName:1433 ,userid,Pwd); I get an Exception.. macromedia.jdbc.MacromediaDriver$InvalidLicenseException: An Enterprise license is needed to use the Macromedia JDBC Drivers on the DB2, Oracle, Sybase and Info rmix servers. I am running CFMX Enterprise version(6,0,0,48097). I have the same connection working fine in JSP Pages under CFMX. Are CFMX Enterprise drivers protected from usage in Java Applications(Console/Swing)? Anybody from MM Product Team can explain this? Joe -Original Message- From: Joe Eugene [mailto:[EMAIL PROTECTED]] Sent: Friday, November 22, 2002 4:11 PM To: CF-Talk Subject: RE: Java in CF (CFMX) - MM Drivers I can use the CFMX MM DB drivers in a JSP page..No problem. however.. i need to use it in a Java Application..tried to load the Driver.. Class.forName(macromedia.jdbc.MacromediaDriver) Keep getting ClassNotFound Error.. I put the macromedia_driver.jar in the class path.. still not loading.. Do i need to import something? What am i missing? Joe PS:Old Thread. I am just catching up on this Thread.. Isnt the idea to comply with J2EE Architecture? Model-View-Controller model etc.. Why would some want to write in-line Java..? Anyways... On Fri, 22 Nov 2002 09:09:16 -0500 Phil Costa [EMAIL PROTECTED] wrote: The decision to disallow inline java code was definitely not a cut and dry one. One reason was definitely to enforce a cleaner separation of syntax; the other, which I hadn't mentioned, was to remove some additional complexity from the parsing/compiling process. Because of the differences between typing and syntax, parsing a page that had both Java and CFML/CFScript would have been a bear. Phil -Original Message- From: Jon Hall [mailto:[EMAIL PROTECTED]] Sent: Friday, November 22, 2002 2:37 AM To: CF-Talk Subject: Re: Java in CF (CFMX) Thursday, November 21, 2002, 11:54:58 PM, you wrote: MT Jon Hall wrote: The case for allowing inline Java is simple, CF developers can use Java without having to know everything about Java. Methods and classes are easy to get. Compiling, classpath's, and understanding the lengths Java goes to, to abstract everything, etc. is not. MT Knowing just a little about a language as deep/complex as Java can MT be dangerous in a number of ways... MT It's very easy to run into errors in java if you don't understand MT how it all works (ex. trying to instantiate an interface). One of MT the overriding strengths of CF is that it offers a great deal of MT power in an easy to use/learn style. This sort of thing, IMO, goes MT against that strength. MT Mixing CFML and Java can very quickly lead to code that is horribly MT organized and difficult to follow/maintain. Obviously, anal coders MT will keep things nice and neat, but others will be mashing CFML, MT CFScript, Java, and SQL together haphazardly. MT Then there's the compatibility thing... Java lists != CF lists. MT Java arrays != CF arrays. Etc. Again, this can lead to confusion MT and cause all kinds
RE: Java in CF (CFMX) - MM Drivers
Phil/MM Product Team All the drivers are from DataDirect/Merant except for the mySQL driver. Are you sure about the above? What Java Type IV driver is provided with CFMX for DB2 UDB? This? http://www.datadirect-technologies.com/products/jdbc/jdbcrelhighlights.asp The above driver supports DB2 UDB for AS400(iSeries) for V5R4 and V5R1 OS Versions. I havent been able to configure this connection with CFMX..(got a Native JTOpen connection working) and i dont think AS400 DB2 UDB is supported Can you give some documentation on exactly what drivers CMFX uses(Author/Versions)? It would be very helpful to see some documentation on implementation of CFQUERY and how connection pooling works in CFMX. Thanks Joe On Mon, 9 Dec 2002 08:43:38 -0500 Phil Costa [EMAIL PROTECTED] wrote: Better late than never ;-) All the drivers are from DataDirect/Merant except for the mySQL driver. I believe a third-party JDBC driver would be managed just like one of the drivers included with CFMX, but I have to verify that. Phil -Original Message- From: Joe Eugene [mailto:[EMAIL PROTECTED]] Sent: Saturday, December 07, 2002 11:01 PM To: CF-Talk Subject: RE: Java in CF (CFMX) - MM Drivers Anybody from MM Product Team can explain this? on November 24, 2002 5:24 PM Product Teams reply 2 weeks later on the Thread!. Talked to Sean and figured out this already. Anyways since you mentioned it, Are all CFMX Native Drivers DataDirect Drivers(Oracle,DB2 UDB). If you configure a Type IV Native Datasource in CMFX... Does CFMX manage connection pooling? Single Connection.. Multiple Statements? How does this work? Thanks Joe -Original Message- From: Phil Costa [mailto:[EMAIL PROTECTED]] Sent: Friday, December 06, 2002 4:49 PM To: CF-Talk Subject: RE: Java in CF (CFMX) - MM Drivers It's throwing that error because you're trying to access the JDBC drivers in an unlicensed fashion. The DataDirect drivers are licensed for use with ColdFusion, which includes support for JSP as well as CFML, not the scenario you're describing. Phil Costa Sr. Product Manager, ColdFusion Macromedia -Original Message- From: Joe Eugene [mailto:[EMAIL PROTECTED]] Sent: Sunday, November 24, 2002 5:24 PM To: CF-Talk Subject: RE: Java in CF (CFMX) - MM Drivers I got this partially resolved... Sean helped out.. Thanks Sean. It was a classpath problem. However after i load the drivers(macromedia.jdbc.MacromediaDriver) which is in the lib directory of your installation(eg. G:\CFusionMX\lib\macromedia_drivers.jar) and give it the connection url.. Connection con = DriverManager.getConnection(jdbc:macromedia:sqlserver://SqlServerName:1433 ,userid,Pwd); I get an Exception.. macromedia.jdbc.MacromediaDriver$InvalidLicenseException: An Enterprise license is needed to use the Macromedia JDBC Drivers on the DB2, Oracle, Sybase and Info rmix servers. I am running CFMX Enterprise version(6,0,0,48097). I have the same connection working fine in JSP Pages under CFMX. Are CFMX Enterprise drivers protected from usage in Java Applications(Console/Swing)? Anybody from MM Product Team can explain this? Joe -Original Message- From: Joe Eugene [mailto:[EMAIL PROTECTED]] Sent: Friday, November 22, 2002 4:11 PM To: CF-Talk Subject: RE: Java in CF (CFMX) - MM Drivers I can use the CFMX MM DB drivers in a JSP page..No problem. however.. i need to use it in a Java Application..tried to load the Driver.. Class.forName(macromedia.jdbc.MacromediaDriver) Keep getting ClassNotFound Error.. I put the macromedia_driver.jar in the class path.. still not loading.. Do i need to import something? What am i missing? Joe PS:Old Thread. I am just catching up on this Thread.. Isnt the idea to comply with J2EE Architecture? Model-View-Controller model etc.. Why would some want to write in-line Java..? Anyways... On Fri, 22 Nov 2002 09:09:16 -0500 Phil Costa wrote: The decision to disallow inline java code was definitely not a cut and dry one. One reason was definitely to enforce a cleaner separation of syntax; the other, which I hadn't mentioned, was to remove some additional complexity from the parsing/compiling process. Because of the differences between typing and syntax, parsing a page that had both Java and CFML/CFScript would have been a bear. Phil -Original Message- From: Jon Hall [mailto:[EMAIL PROTECTED]] Sent: Friday, November 22, 2002 2:37 AM To: CF-Talk Subject: Re: Java in CF (CFMX) Thursday, November 21, 2002, 11:54:58 PM, you wrote: MT Jon Hall wrote: The case for allowing inline Java is simple, CF developers can use Java without having to know everything about Java. Methods and classes are easy to get. Compiling, classpath's, and understanding the lengths Java goes
RE: Java in CF (CFMX) - MM Drivers
We recently moved from SQL7.0 with the included MX (DataDirect/Merant) JDBC drivers, to SQL2000 with MS provided JDBC drivers and it was (aside from microsofts non-standard jdbc uri) simple. In other words believe a third-party JDBC driver would be managed just like one of the drivers included with CFMX, is true. Rob http://treebeard.sourceforge.net http://ruinworld.sourceforge.net Scientia Est Potentia -Original Message- From: Phil Costa [mailto:[EMAIL PROTECTED]] Sent: Monday, December 09, 2002 5:44 AM To: CF-Talk Subject: RE: Java in CF (CFMX) - MM Drivers Better late than never ;-) All the drivers are from DataDirect/Merant except for the mySQL driver. I believe a third-party JDBC driver would be managed just like one of the drivers included with CFMX, but I have to verify that. Phil -Original Message- From: Joe Eugene [mailto:[EMAIL PROTECTED]] Sent: Saturday, December 07, 2002 11:01 PM To: CF-Talk Subject: RE: Java in CF (CFMX) - MM Drivers Anybody from MM Product Team can explain this? on November 24, 2002 5:24 PM Product Teams reply 2 weeks later on the Thread!. Talked to Sean and figured out this already. Anyways since you mentioned it, Are all CFMX Native Drivers DataDirect Drivers(Oracle,DB2 UDB). If you configure a Type IV Native Datasource in CMFX... Does CFMX manage connection pooling? Single Connection.. Multiple Statements? How does this work? Thanks Joe -Original Message- From: Phil Costa [mailto:[EMAIL PROTECTED]] Sent: Friday, December 06, 2002 4:49 PM To: CF-Talk Subject: RE: Java in CF (CFMX) - MM Drivers It's throwing that error because you're trying to access the JDBC drivers in an unlicensed fashion. The DataDirect drivers are licensed for use with ColdFusion, which includes support for JSP as well as CFML, not the scenario you're describing. Phil Costa Sr. Product Manager, ColdFusion Macromedia -Original Message- From: Joe Eugene [mailto:[EMAIL PROTECTED]] Sent: Sunday, November 24, 2002 5:24 PM To: CF-Talk Subject: RE: Java in CF (CFMX) - MM Drivers I got this partially resolved... Sean helped out.. Thanks Sean. It was a classpath problem. However after i load the drivers(macromedia.jdbc.MacromediaDriver) which is in the lib directory of your installation(eg. G:\CFusionMX\lib\macromedia_drivers.jar) and give it the connection url.. Connection con = DriverManager.getConnection(jdbc:macromedia:sqlserver://SqlServerName:1433 ,userid,Pwd); I get an Exception.. macromedia.jdbc.MacromediaDriver$InvalidLicenseException: An Enterprise license is needed to use the Macromedia JDBC Drivers on the DB2, Oracle, Sybase and Info rmix servers. I am running CFMX Enterprise version(6,0,0,48097). I have the same connection working fine in JSP Pages under CFMX. Are CFMX Enterprise drivers protected from usage in Java Applications(Console/Swing)? Anybody from MM Product Team can explain this? Joe -Original Message- From: Joe Eugene [mailto:[EMAIL PROTECTED]] Sent: Friday, November 22, 2002 4:11 PM To: CF-Talk Subject: RE: Java in CF (CFMX) - MM Drivers I can use the CFMX MM DB drivers in a JSP page..No problem. however.. i need to use it in a Java Application..tried to load the Driver.. Class.forName(macromedia.jdbc.MacromediaDriver) Keep getting ClassNotFound Error.. I put the macromedia_driver.jar in the class path.. still not loading.. Do i need to import something? What am i missing? Joe PS:Old Thread. I am just catching up on this Thread.. Isnt the idea to comply with J2EE Architecture? Model-View-Controller model etc.. Why would some want to write in-line Java..? Anyways... On Fri, 22 Nov 2002 09:09:16 -0500 Phil Costa [EMAIL PROTECTED] wrote: The decision to disallow inline java code was definitely not a cut and dry one. One reason was definitely to enforce a cleaner separation of syntax; the other, which I hadn't mentioned, was to remove some additional complexity from the parsing/compiling process. Because of the differences between typing and syntax, parsing a page that had both Java and CFML/CFScript would have been a bear. Phil -Original Message- From: Jon Hall [mailto:[EMAIL PROTECTED]] Sent: Friday, November 22, 2002 2:37 AM To: CF-Talk Subject: Re: Java in CF (CFMX) Thursday, November 21, 2002, 11:54:58 PM, you wrote: MT Jon Hall wrote: The case for allowing inline Java is simple, CF developers can use Java without having to know everything about Java. Methods and classes are easy to get. Compiling, classpath's, and understanding the lengths Java goes to, to abstract everything, etc. is not. MT Knowing just a little about a language as deep/complex as Java can MT be dangerous in a number of ways... MT It's very easy to run into errors in java if you don't understand MT how it all works (ex. trying to instantiate an interface). One of MT the overriding strengths of CF is that it offers a great
RE: Java in CF (CFMX) - MM Drivers
believe a third-party JDBC driver would be managed just like one of the drivers included with CFMX, is true. Have you done any tests on how the driver connection pooling works with native JDBC type IV other connections? Yea.. i have configured Oracle 8.0.5 and AS400 DB2 V5R1 Native Drivers and they are working... but am clueless.. on the how this works... without seeing some documentation of CFQUERY implementation. It works... How is the QUESTION? Thanks Joe -Original Message- From: Rob Rohan [mailto:[EMAIL PROTECTED]] Sent: Monday, December 09, 2002 1:18 PM To: CF-Talk Subject: RE: Java in CF (CFMX) - MM Drivers We recently moved from SQL7.0 with the included MX (DataDirect/Merant) JDBC drivers, to SQL2000 with MS provided JDBC drivers and it was (aside from microsofts non-standard jdbc uri) simple. In other words believe a third-party JDBC driver would be managed just like one of the drivers included with CFMX, is true. Rob http://treebeard.sourceforge.net http://ruinworld.sourceforge.net Scientia Est Potentia -Original Message- From: Phil Costa [mailto:[EMAIL PROTECTED]] Sent: Monday, December 09, 2002 5:44 AM To: CF-Talk Subject: RE: Java in CF (CFMX) - MM Drivers Better late than never ;-) All the drivers are from DataDirect/Merant except for the mySQL driver. I believe a third-party JDBC driver would be managed just like one of the drivers included with CFMX, but I have to verify that. Phil -Original Message- From: Joe Eugene [mailto:[EMAIL PROTECTED]] Sent: Saturday, December 07, 2002 11:01 PM To: CF-Talk Subject: RE: Java in CF (CFMX) - MM Drivers Anybody from MM Product Team can explain this? on November 24, 2002 5:24 PM Product Teams reply 2 weeks later on the Thread!. Talked to Sean and figured out this already. Anyways since you mentioned it, Are all CFMX Native Drivers DataDirect Drivers(Oracle,DB2 UDB). If you configure a Type IV Native Datasource in CMFX... Does CFMX manage connection pooling? Single Connection.. Multiple Statements? How does this work? Thanks Joe -Original Message- From: Phil Costa [mailto:[EMAIL PROTECTED]] Sent: Friday, December 06, 2002 4:49 PM To: CF-Talk Subject: RE: Java in CF (CFMX) - MM Drivers It's throwing that error because you're trying to access the JDBC drivers in an unlicensed fashion. The DataDirect drivers are licensed for use with ColdFusion, which includes support for JSP as well as CFML, not the scenario you're describing. Phil Costa Sr. Product Manager, ColdFusion Macromedia -Original Message- From: Joe Eugene [mailto:[EMAIL PROTECTED]] Sent: Sunday, November 24, 2002 5:24 PM To: CF-Talk Subject: RE: Java in CF (CFMX) - MM Drivers I got this partially resolved... Sean helped out.. Thanks Sean. It was a classpath problem. However after i load the drivers(macromedia.jdbc.MacromediaDriver) which is in the lib directory of your installation(eg. G:\CFusionMX\lib\macromedia_drivers.jar) and give it the connection url.. Connection con = DriverManager.getConnection(jdbc:macromedia:sqlserver://SqlServer Name:1433 ,userid,Pwd); I get an Exception.. macromedia.jdbc.MacromediaDriver$InvalidLicenseException: An Enterprise license is needed to use the Macromedia JDBC Drivers on the DB2, Oracle, Sybase and Info rmix servers. I am running CFMX Enterprise version(6,0,0,48097). I have the same connection working fine in JSP Pages under CFMX. Are CFMX Enterprise drivers protected from usage in Java Applications(Console/Swing)? Anybody from MM Product Team can explain this? Joe -Original Message- From: Joe Eugene [mailto:[EMAIL PROTECTED]] Sent: Friday, November 22, 2002 4:11 PM To: CF-Talk Subject: RE: Java in CF (CFMX) - MM Drivers I can use the CFMX MM DB drivers in a JSP page..No problem. however.. i need to use it in a Java Application..tried to load the Driver.. Class.forName(macromedia.jdbc.MacromediaDriver) Keep getting ClassNotFound Error.. I put the macromedia_driver.jar in the class path.. still not loading.. Do i need to import something? What am i missing? Joe PS:Old Thread. I am just catching up on this Thread.. Isnt the idea to comply with J2EE Architecture? Model-View-Controller model etc.. Why would some want to write in-line Java..? Anyways... On Fri, 22 Nov 2002 09:09:16 -0500 Phil Costa [EMAIL PROTECTED] wrote: The decision to disallow inline java code was definitely not a cut and dry one. One reason was definitely to enforce a cleaner separation of syntax; the other, which I hadn't mentioned, was to remove some additional complexity from the parsing/compiling process. Because of the differences between typing and syntax, parsing a page that had both Java and CFML/CFScript would have been a bear. Phil -Original Message- From: Jon Hall [mailto:[EMAIL PROTECTED]] Sent: Friday
RE: Java in CF (CFMX) - MM Drivers
Anybody from MM Product Team can explain this? on November 24, 2002 5:24 PM Product Teams reply 2 weeks later on the Thread!. Talked to Sean and figured out this already. Anyways since you mentioned it, Are all CFMX Native Drivers DataDirect Drivers(Oracle,DB2 UDB). If you configure a Type IV Native Datasource in CMFX... Does CFMX manage connection pooling? Single Connection.. Multiple Statements? How does this work? Thanks Joe -Original Message- From: Phil Costa [mailto:[EMAIL PROTECTED]] Sent: Friday, December 06, 2002 4:49 PM To: CF-Talk Subject: RE: Java in CF (CFMX) - MM Drivers It's throwing that error because you're trying to access the JDBC drivers in an unlicensed fashion. The DataDirect drivers are licensed for use with ColdFusion, which includes support for JSP as well as CFML, not the scenario you're describing. Phil Costa Sr. Product Manager, ColdFusion Macromedia -Original Message- From: Joe Eugene [mailto:[EMAIL PROTECTED]] Sent: Sunday, November 24, 2002 5:24 PM To: CF-Talk Subject: RE: Java in CF (CFMX) - MM Drivers I got this partially resolved... Sean helped out.. Thanks Sean. It was a classpath problem. However after i load the drivers(macromedia.jdbc.MacromediaDriver) which is in the lib directory of your installation(eg. G:\CFusionMX\lib\macromedia_drivers.jar) and give it the connection url.. Connection con = DriverManager.getConnection(jdbc:macromedia:sqlserver://SqlServerName:1433 ,userid,Pwd); I get an Exception.. macromedia.jdbc.MacromediaDriver$InvalidLicenseException: An Enterprise license is needed to use the Macromedia JDBC Drivers on the DB2, Oracle, Sybase and Info rmix servers. I am running CFMX Enterprise version(6,0,0,48097). I have the same connection working fine in JSP Pages under CFMX. Are CFMX Enterprise drivers protected from usage in Java Applications(Console/Swing)? Anybody from MM Product Team can explain this? Joe -Original Message- From: Joe Eugene [mailto:[EMAIL PROTECTED]] Sent: Friday, November 22, 2002 4:11 PM To: CF-Talk Subject: RE: Java in CF (CFMX) - MM Drivers I can use the CFMX MM DB drivers in a JSP page..No problem. however.. i need to use it in a Java Application..tried to load the Driver.. Class.forName(macromedia.jdbc.MacromediaDriver) Keep getting ClassNotFound Error.. I put the macromedia_driver.jar in the class path.. still not loading.. Do i need to import something? What am i missing? Joe PS:Old Thread. I am just catching up on this Thread.. Isnt the idea to comply with J2EE Architecture? Model-View-Controller model etc.. Why would some want to write in-line Java..? Anyways... On Fri, 22 Nov 2002 09:09:16 -0500 Phil Costa [EMAIL PROTECTED] wrote: The decision to disallow inline java code was definitely not a cut and dry one. One reason was definitely to enforce a cleaner separation of syntax; the other, which I hadn't mentioned, was to remove some additional complexity from the parsing/compiling process. Because of the differences between typing and syntax, parsing a page that had both Java and CFML/CFScript would have been a bear. Phil -Original Message- From: Jon Hall [mailto:[EMAIL PROTECTED]] Sent: Friday, November 22, 2002 2:37 AM To: CF-Talk Subject: Re: Java in CF (CFMX) Thursday, November 21, 2002, 11:54:58 PM, you wrote: MT Jon Hall wrote: The case for allowing inline Java is simple, CF developers can use Java without having to know everything about Java. Methods and classes are easy to get. Compiling, classpath's, and understanding the lengths Java goes to, to abstract everything, etc. is not. MT Knowing just a little about a language as deep/complex as Java can MT be dangerous in a number of ways... MT It's very easy to run into errors in java if you don't understand MT how it all works (ex. trying to instantiate an interface). One of MT the overriding strengths of CF is that it offers a great deal of MT power in an easy to use/learn style. This sort of thing, IMO, goes MT against that strength. MT Mixing CFML and Java can very quickly lead to code that is horribly MT organized and difficult to follow/maintain. Obviously, anal coders MT will keep things nice and neat, but others will be mashing CFML, MT CFScript, Java, and SQL together haphazardly. MT Then there's the compatibility thing... Java lists != CF lists. MT Java arrays != CF arrays. Etc. Again, this can lead to confusion MT and cause all kinds of errors. I say let the coders (and the pm's who have a clue ) who write the applications make the decision on what works in their application. I'm not trying to be facetious, but be brutally honest, I couldn't care less that anyone else thinks my hypothetical hybrid Java/CF code is unorganized or difficult to maintain, as long as those that it matters to, like my boss and clients don't care either. So I
RE: Java in CF (CFMX) - MM Drivers
It's throwing that error because you're trying to access the JDBC drivers in an unlicensed fashion. The DataDirect drivers are licensed for use with ColdFusion, which includes support for JSP as well as CFML, not the scenario you're describing. Phil Costa Sr. Product Manager, ColdFusion Macromedia -Original Message- From: Joe Eugene [mailto:[EMAIL PROTECTED]] Sent: Sunday, November 24, 2002 5:24 PM To: CF-Talk Subject: RE: Java in CF (CFMX) - MM Drivers I got this partially resolved... Sean helped out.. Thanks Sean. It was a classpath problem. However after i load the drivers(macromedia.jdbc.MacromediaDriver) which is in the lib directory of your installation(eg. G:\CFusionMX\lib\macromedia_drivers.jar) and give it the connection url.. Connection con = DriverManager.getConnection(jdbc:macromedia:sqlserver://SqlServerName:1433 ,userid,Pwd); I get an Exception.. macromedia.jdbc.MacromediaDriver$InvalidLicenseException: An Enterprise license is needed to use the Macromedia JDBC Drivers on the DB2, Oracle, Sybase and Info rmix servers. I am running CFMX Enterprise version(6,0,0,48097). I have the same connection working fine in JSP Pages under CFMX. Are CFMX Enterprise drivers protected from usage in Java Applications(Console/Swing)? Anybody from MM Product Team can explain this? Joe -Original Message- From: Joe Eugene [mailto:[EMAIL PROTECTED]] Sent: Friday, November 22, 2002 4:11 PM To: CF-Talk Subject: RE: Java in CF (CFMX) - MM Drivers I can use the CFMX MM DB drivers in a JSP page..No problem. however.. i need to use it in a Java Application..tried to load the Driver.. Class.forName(macromedia.jdbc.MacromediaDriver) Keep getting ClassNotFound Error.. I put the macromedia_driver.jar in the class path.. still not loading.. Do i need to import something? What am i missing? Joe PS:Old Thread. I am just catching up on this Thread.. Isnt the idea to comply with J2EE Architecture? Model-View-Controller model etc.. Why would some want to write in-line Java..? Anyways... On Fri, 22 Nov 2002 09:09:16 -0500 Phil Costa [EMAIL PROTECTED] wrote: The decision to disallow inline java code was definitely not a cut and dry one. One reason was definitely to enforce a cleaner separation of syntax; the other, which I hadn't mentioned, was to remove some additional complexity from the parsing/compiling process. Because of the differences between typing and syntax, parsing a page that had both Java and CFML/CFScript would have been a bear. Phil -Original Message- From: Jon Hall [mailto:[EMAIL PROTECTED]] Sent: Friday, November 22, 2002 2:37 AM To: CF-Talk Subject: Re: Java in CF (CFMX) Thursday, November 21, 2002, 11:54:58 PM, you wrote: MT Jon Hall wrote: The case for allowing inline Java is simple, CF developers can use Java without having to know everything about Java. Methods and classes are easy to get. Compiling, classpath's, and understanding the lengths Java goes to, to abstract everything, etc. is not. MT Knowing just a little about a language as deep/complex as Java can MT be dangerous in a number of ways... MT It's very easy to run into errors in java if you don't understand MT how it all works (ex. trying to instantiate an interface). One of MT the overriding strengths of CF is that it offers a great deal of MT power in an easy to use/learn style. This sort of thing, IMO, goes MT against that strength. MT Mixing CFML and Java can very quickly lead to code that is horribly MT organized and difficult to follow/maintain. Obviously, anal coders MT will keep things nice and neat, but others will be mashing CFML, MT CFScript, Java, and SQL together haphazardly. MT Then there's the compatibility thing... Java lists != CF lists. MT Java arrays != CF arrays. Etc. Again, this can lead to confusion MT and cause all kinds of errors. I say let the coders (and the pm's who have a clue ) who write the applications make the decision on what works in their application. I'm not trying to be facetious, but be brutally honest, I couldn't care less that anyone else thinks my hypothetical hybrid Java/CF code is unorganized or difficult to maintain, as long as those that it matters to, like my boss and clients don't care either. So I don't see how the fear of some overwhelming horde of organized code existing somewhere out there, just over the horizon, really is a valid argument against allowing inline Java within CF templates. CFQuery is the perfect example here. If CF gives developers the power to do whatever they want within cfquery tags, then why not java within cfjava tags? Seems's inconsistent to me. Especially since cfquery probably the biggest strength of the CF language. MT SQL and CFML serve 2 different purposes, database manipulation and MT application logic. Java
Re: Java in CF (CFMX)
Joe Your example, does, in fact work. Of course, I needed to modify the Java code to specify a different database -- none of the MS databases appear to work on Mac OS X (or and non-win platform) :) This is enough to get me started -- I will add the flexibility to the interface so it will work with any JDBC driver, and any MetaData request. Thanks I have never written a wrapper for a Java program it helps to start with a working example, and concise instructions. You, likely, saved me several hours of frustration. I think that implementing and deploying this example is a good illustration of the value of inline Java. Someone new to Java, like myself, could take your example and drop it into a simpleCF template, between cfjava,,,/ tags. Then they could add the CFML portion in the same template. More likely, you would have provided a complete, standalone CF Template with the Java code, inline. Then they could save and test the template without concern for: 1) Separating your file into its Java and CFML component parts. 2) Where to put the Java source 3) How to compile the Java class 4) Which Java compiler options to use and their proper settings -- things such as: Usage: javac options source files where possible options include: -gGenerate all debugging info -g:none Generate no debugging info -g:{lines,vars,source}Generate only some debugging info -OOptimize; may hinder debugging or enlarge class file -nowarn Generate no warnings -verbose Output messages about what the compiler is doing -deprecation Output source locations where deprecated APIs are used -classpath path Specify where to find user class files -sourcepath pathSpecify where to find input source files -bootclasspath path Override location of bootstrap class files -extdirs dirs Override location of installed extensions -d directorySpecify where to place generated class files -encoding encoding Specify character encoding used by source files -target release Generate class files for specific VM version 5) Figuring out the command line interface or some Java IDE, just to be able to compile the Java program. 6) Where to put the Java class 7) Where to get a Java compiler if one isn't installed on their platform (Mac OS X comes, standard, with a JDK, but many platforms do not). Sure, these are things that the new Java person will need to learn eventually. But, is it necessary to overload the new Java user with all this minutiae, just to try a simple Java example -- I think not! Is there value to the Java developer (new or experienced) to inline code -- Yes, I've noted some advantages to the lay person. But, Joe, who is experienced with Java, could have benefitted from inline Java too. I suspect he would have saved time preparing/testing his example and the instructions how to deploy it : 1) He, simply, could have provided a single CF template with the Java inline; rather than a Java program and a separate CF template. 2) He could have avoided typing the instructions to compile and deploy the Java program 3) The flow of the example, likely, would be better, better understood, and easier to explain and document within the code (both CF and Java Comments) 4) He'd have a single file, a complete example, with no special instructions -- Just Save it and Run it as you would any other CF template. Is there significant [enough] value, that MM should consider implementing inline Java -- I think so -- what it boils down to is this: inline Java is an improved interface to many Java programs -- much the way that cfquery (and the associated cfoutput, cfloop, etc.) tags are an improvement to many SQL databases. Here are some advantages to MM. 1) The CFMX product could have another productivity advantage for developers, and resellers... hmm... I wonder if IBM could use this feature 2) Macromedia could more easily, and more effectively include many Java examples in the code they distribute, 3) Inline Java could facilitate writing, testing and documenting wrappers for many Java programs (whether deployed inline or not). 4) It could be easier to reconcile Java constructs of strong typing, nulls, etc, with the absence these constructs in CFML. In fact. inline Java, could provide a very nice means to help pass data between CFML and Java -- something like cfjavaparam where you could specify typing, nulls, etc. in a way meaningful to both CFML and Java. 5
RE: Java in CF (CFMX)
Personally, I'd like to see CF Script expanded to deal with strongly typed code. It would be extremely cool to be able to run code from a different languages in a cfscript block (kinda' like MS's Scripting Host). I can see a couple of other benefits to having inline Java code: Stronger types for variables. (well, stronger types for /values/). Sometimes it's extremely useful to have strong types. For example, I worked on using native COM datasets in CF a few years back and we had a lot of problems converting the native COM dataset into a CF query. was a huge performance hit for a CF script to loop over each field, convert it, and stuff it in a CF query. If CF could (optionally) deal with different types I think it would have been a lot easier to do, and a cfscript block would be a great place for this. Also, it would be *great* to be able to pass functions around as values--that alone would certainly simplify my code in places. One of CF's great benefits is it's simplicity, but sometimes it's important to be able to get out of the simple tag-based techniques of CF and into more advanced techniques. When I'm developing, sometimes I want to be able to just dump some code on a page and thrash away. It gets in the way to have to develop separate components. After I'm done thrashing out some code, I want to make sure it's clean and maintainable, and put it into components, though. It's just nice to have the option. I know basically nothing about the actual behind-the-scenes architecture of CF, so take this with a grain of salt, but I don't see why CF couldn't just automatically compile a cfscript block as a separate class if you added a keyword to it, like: cfscript language=java. There is already a lot of code generation going on when CF creates the class files from a CF page. Well, just my $0.02... Jeff Polaski The cow is of the bovine ilk; One end is moo, the other, milk. -- Ogden Nash -Original Message- From: Dick Applebaum [mailto:[EMAIL PROTECTED]] Sent: Saturday, November 23, 2002 9:30 PM To: CF-Talk Subject: Re: Java in CF (CFMX) I am really late to this thread -- been doin' other interesting stuff. There are one (or two, or forty) reasons that have not been mentioned, that make inline Java code a benefit. 1) Where needed in an app, you can get strong typing and nulls -- say you want to communicate with a JDBC driver and retrieve Table/Column attributes from a db -- most JDBC drivers provide this info, but you can't get at it directly form CMFX. 2) Where CFMX can act as a gentle introduction to Java -- certainly this hybrid code would not be the best, but it would allow Java neophytes, like myself, to learn Java gracefully, without having to learn all the rules first. -- There is something about the fact that we can learn our native language, better, by the age of 5, than a person with 4 years of college courses on that language -- simple introduction, constant use, familiarity-- a lot of us Learn by Doing! 3) This would put /keep CF at the head of the pack -- one more significant reason to choose CF over the competition -- EasyJava -- choose the language/implementation that makes the most sense for an application and/or a tier. Dick P.S. while I am asking for things, I'd like to see a cfo.../cfo tag -- does the same thing (and does not deprecate the cfoutput tag-- just a lot easier to type (and pretty self-documenting, and makes a lot more sense than that %= crap!) On Friday, November 22, 2002, at 08:56 AM, Rob Rohan wrote: I understand your decision but I have a couple more things to add, then I'll shut up. 1) To me CFSCRIPT is to Cold Fusion 5 what CFJAVA would've been to CFMX. 2) I also don't think people would just use a cfjava block to just use it. There would have to be a need. (I.E. a custom java tag that doesn't need to be installed) 3) I would like to play with inner classes / threads on a page and casting to thing (like a CF list to a hashtable - don't even know if that would work, but you get the idea). 4) There could be performance gains beyond code execution. For example, when you make a cfm page into a class it adds a bunch of \r\t which is necessary in almost all cases (but certain blocks could be controlled) Thanks for listening Phil and all you wacky MM guys Rob Certified Organic When you put things in quotes, people think someone actually said it. http://treebeard.sourceforge.net http://ruinworld.sourceforge.net Scientia Est Potentia -Original Message- From: Phil Costa [mailto:[EMAIL PROTECTED]] Sent: Friday, November 22, 2002 6:09 AM To: CF-Talk Subject: RE: Java in CF (CFMX) The decision to disallow inline java code was definitely not a cut and dry one. One reason was definitely to enforce a cleaner separation of syntax; the other, which I hadn't mentioned, was to remove some additional
RE: Java in CF (CFMX)
I think someone at MM should look up BSF. Rob http://treebeard.sourceforge.net http://ruinworld.sourceforge.net Scientia Est Potentia -Original Message- From: Jeffrey Polaski [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 26, 2002 10:50 AM To: CF-Talk Subject: RE: Java in CF (CFMX) Personally, I'd like to see CF Script expanded to deal with strongly typed code. It would be extremely cool to be able to run code from a different languages in a cfscript block (kinda' like MS's Scripting Host). I can see a couple of other benefits to having inline Java code: Stronger types for variables. (well, stronger types for /values/). Sometimes it's extremely useful to have strong types. For example, I worked on using native COM datasets in CF a few years back and we had a lot of problems converting the native COM dataset into a CF query. was a huge performance hit for a CF script to loop over each field, convert it, and stuff it in a CF query. If CF could (optionally) deal with different types I think it would have been a lot easier to do, and a cfscript block would be a great place for this. Also, it would be *great* to be able to pass functions around as values--that alone would certainly simplify my code in places. One of CF's great benefits is it's simplicity, but sometimes it's important to be able to get out of the simple tag-based techniques of CF and into more advanced techniques. When I'm developing, sometimes I want to be able to just dump some code on a page and thrash away. It gets in the way to have to develop separate components. After I'm done thrashing out some code, I want to make sure it's clean and maintainable, and put it into components, though. It's just nice to have the option. I know basically nothing about the actual behind-the-scenes architecture of CF, so take this with a grain of salt, but I don't see why CF couldn't just automatically compile a cfscript block as a separate class if you added a keyword to it, like: cfscript language=java. There is already a lot of code generation going on when CF creates the class files from a CF page. Well, just my $0.02... Jeff Polaski The cow is of the bovine ilk; One end is moo, the other, milk. -- Ogden Nash -Original Message- From: Dick Applebaum [mailto:[EMAIL PROTECTED]] Sent: Saturday, November 23, 2002 9:30 PM To: CF-Talk Subject: Re: Java in CF (CFMX) I am really late to this thread -- been doin' other interesting stuff. There are one (or two, or forty) reasons that have not been mentioned, that make inline Java code a benefit. 1) Where needed in an app, you can get strong typing and nulls -- say you want to communicate with a JDBC driver and retrieve Table/Column attributes from a db -- most JDBC drivers provide this info, but you can't get at it directly form CMFX. 2) Where CFMX can act as a gentle introduction to Java -- certainly this hybrid code would not be the best, but it would allow Java neophytes, like myself, to learn Java gracefully, without having to learn all the rules first. -- There is something about the fact that we can learn our native language, better, by the age of 5, than a person with 4 years of college courses on that language -- simple introduction, constant use, familiarity-- a lot of us Learn by Doing! 3) This would put /keep CF at the head of the pack -- one more significant reason to choose CF over the competition -- EasyJava -- choose the language/implementation that makes the most sense for an application and/or a tier. Dick P.S. while I am asking for things, I'd like to see a cfo.../cfo tag -- does the same thing (and does not deprecate the cfoutput tag-- just a lot easier to type (and pretty self-documenting, and makes a lot more sense than that %= crap!) On Friday, November 22, 2002, at 08:56 AM, Rob Rohan wrote: I understand your decision but I have a couple more things to add, then I'll shut up. 1) To me CFSCRIPT is to Cold Fusion 5 what CFJAVA would've been to CFMX. 2) I also don't think people would just use a cfjava block to just use it. There would have to be a need. (I.E. a custom java tag that doesn't need to be installed) 3) I would like to play with inner classes / threads on a page and casting to thing (like a CF list to a hashtable - don't even know if that would work, but you get the idea). 4) There could be performance gains beyond code execution. For example, when you make a cfm page into a class it adds a bunch of \r\t which is necessary in almost all cases (but certain blocks could be controlled) Thanks for listening Phil and all you wacky MM guys Rob Certified Organic When you put things in quotes, people think someone actually said it. http://treebeard.sourceforge.net http://ruinworld.sourceforge.net Scientia Est Potentia -Original Message- From: Phil Costa [mailto:[EMAIL PROTECTED]] Sent: Friday, November 22, 2002 6:09 AM To: CF-Talk Subject: RE: Java
Re: Java in CF (CFMX)
Dick No problem, i got the same solution working with MM,MS-SQL and Oracle drivers without any problem. You, likely, saved me several hours of frustration. Now the ideal solution would be to return Complex Objects/Types(Structs,ResultSets) back to CFMX. Havent had a chance to play with Structs(CFMX-Java) compatibility. Is there value to the Java developer (new or experienced) to inline code -- Yes, I understand your need. A while ago, we looked at the generated Java code(Real Ugly!) from a *.cfm page. A lot of ugly wrappers coverting loose *.cfm TYPES to strong Java Types..(Result..Slow pages)(Topic Jsp vs Cfm). InLine Java Code. If this ever happens, ideally.. CFMX complier should create a helper class file and let Java Complier, compile it like a Jsp page.. this would be excellent.. but again IS'nt CfObject doing the same thing?(seperating the helper/model class from presentation)...Am trying to relate to Inline Java.. So what overall advantage do we get with Inline Java? Any Performance...? other than coding between CF/Java in templates? I am not against InLine Java.. just trying to understand the Mechanics. Joe On Tue, 26 Nov 2002 07:10:11 -0800 Dick Applebaum [EMAIL PROTECTED] wrote: Joe Your example, does, in fact work. Of course, I needed to modify the Java code to specify a different database -- none of the MS databases appear to work on Mac OS X (or and non-win platform) :) This is enough to get me started -- I will add the flexibility to the interface so it will work with any JDBC driver, and any MetaData request. Thanks I have never written a wrapper for a Java program it helps to start with a working example, and concise instructions. You, likely, saved me several hours of frustration. I think that implementing and deploying this example is a good illustration of the value of inline Java. Someone new to Java, like myself, could take your example and drop it into a simpleCF template, between tags. Then they could add the CFML portion in the same template. More likely, you would have provided a complete, standalone CF Template with the Java code, inline. Then they could save and test the template without concern for: 1) Separating your file into its Java and CFML component parts. 2) Where to put the Java source 3) How to compile the Java class 4) Which Java compiler options to use and their proper settings -- things such as: Usage: javac where possible options include: -gGenerate all debugging info -g:none Generate no debugging info -g:{lines,vars,source}Generate only some debugging info -OOptimize; may hinder debugging or enlarge class file -nowarn Generate no warnings -verbose Output messages about what the compiler is doing -deprecation Output source locations where deprecated APIs are used -classpath Specify where to find user class files -sourcepath Specify where to find input source files -bootclasspath Override location of bootstrap class files -extdirsOverride location of installed extensions -d Specify where to place generated class files -encoding Specify character encoding used by source files -target Generate class files for specific VM version 5) Figuring out the command line interface or some Java IDE, just to be able to compile the Java program. 6) Where to put the Java class 7) Where to get a Java compiler if one isn't installed on their platform (Mac OS X comes, standard, with a JDK, but many platforms do not). Sure, these are things that the new Java person will need to learn eventually. But, is it necessary to overload the new Java user with all this minutiae, just to try a simple Java example -- I think not! Is there value to the Java developer (new or experienced) to inline code -- Yes, I've noted some advantages to the lay person. But, Joe, who is experienced with Java, could have benefitted from inline Java too. I suspect he would have saved time preparing/testing his example and the instructions how to deploy it : 1) He, simply, could have provided a single CF template with the Java inline; rather than a Java program and a separate CF template. 2) He could have avoided typing the instructions to compile and deploy the Java program 3) The flow of the example, likely, would be better, better understood, and easier to explain and document within the code (both CF and Java Comments) 4) He'd have a single
Re: Java in CF (CFMX)
Joe I have been modifing with your Java code to return tables and columns and I ran into a weird situation. for convenience, I put the ,java file in WEB-INF/classes I recompile the program and get a class file I run the CF template, but get the old version of the class file I even deleted the class file -- something is being cached, somewhere -- Where? TIA Dick On Tuesday, November 26, 2002, at 01:35 PM, Joe Eugene wrote: Dick No problem, i got the same solution working with MM,MS-SQL and Oracle drivers without any problem. You, likely, saved me several hours of frustration. Now the ideal solution would be to return Complex Objects/Types(Structs,ResultSets) back to CFMX. Havent had a chance to play with Structs(CFMX-Java) compatibility. Is there value to the Java developer (new or experienced) to inline code -- Yes, I understand your need. A while ago, we looked at the generated Java code(Real Ugly!) from a *.cfm page. A lot of ugly wrappers coverting loose *.cfm TYPES to strong Java Types..(Result..Slow pages)(Topic Jsp vs Cfm). InLine Java Code. If this ever happens, ideally.. CFMX complier should create a helper class file and let Java Complier, compile it like a Jsp page.. this would be excellent.. but again IS'nt CfObject doing the same thing?(seperating the helper/model class from presentation)...Am trying to relate to Inline Java.. So what overall advantage do we get with Inline Java? Any Performance...? other than coding between CF/Java in templates? I am not against InLine Java.. just trying to understand the Mechanics. Joe On Tue, 26 Nov 2002 07:10:11 -0800 Dick Applebaum [EMAIL PROTECTED] wrote: Joe Your example, does, in fact work. Of course, I needed to modify the Java code to specify a different database -- none of the MS databases appear to work on Mac OS X (or and non-win platform) :) This is enough to get me started -- I will add the flexibility to the interface so it will work with any JDBC driver, and any MetaData request. Thanks I have never written a wrapper for a Java program it helps to start with a working example, and concise instructions. You, likely, saved me several hours of frustration. I think that implementing and deploying this example is a good illustration of the value of inline Java. Someone new to Java, like myself, could take your example and drop it into a simpleCF template, between tags. Then they could add the CFML portion in the same template. More likely, you would have provided a complete, standalone CF Template with the Java code, inline. Then they could save and test the template without concern for: 1) Separating your file into its Java and CFML component parts. 2) Where to put the Java source 3) How to compile the Java class 4) Which Java compiler options to use and their proper settings -- things such as: Usage: javac where possible options include: -gGenerate all debugging info -g:none Generate no debugging info -g:{lines,vars,source}Generate only some debugging info -OOptimize; may hinder debugging or enlarge class file -nowarn Generate no warnings -verbose Output messages about what the compiler is doing -deprecation Output source locations where deprecated APIs are used -classpath Specify where to find user class files -sourcepath Specify where to find input source files -bootclasspath Override location of bootstrap class files -extdirsOverride location of installed extensions -d Specify where to place generated class files -encoding Specify character encoding used by source files -target Generate class files for specific VM version 5) Figuring out the command line interface or some Java IDE, just to be able to compile the Java program. 6) Where to put the Java class 7) Where to get a Java compiler if one isn't installed on their platform (Mac OS X comes, standard, with a JDK, but many platforms do not). Sure, these are things that the new Java person will need to learn eventually. But, is it necessary to overload the new Java user with all this minutiae, just to try a simple Java example -- I think not! Is there value to the Java developer (new or experienced) to inline code -- Yes, I've noted some advantages to the lay person. But, Joe, who is experienced with Java, could have benefitted from inline Java too. I suspect he would have saved time preparing/testing his example and the instructions how to deploy it : 1) He, simply, could have provided a single
RE: Java in CF (CFMX)
ah, the fun of writting cf java tags. After you make a change and recompile, you'll need to cycle the service to re-read the class file... unless there is a better way that I don't know about. Rob http://treebeard.sourceforge.net http://ruinworld.sourceforge.net Scientia Est Potentia -Original Message- From: Dick Applebaum [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 26, 2002 2:21 PM To: CF-Talk Subject: Re: Java in CF (CFMX) Joe I have been modifing with your Java code to return tables and columns and I ran into a weird situation. for convenience, I put the ,java file in WEB-INF/classes I recompile the program and get a class file I run the CF template, but get the old version of the class file I even deleted the class file -- something is being cached, somewhere -- Where? TIA Dick On Tuesday, November 26, 2002, at 01:35 PM, Joe Eugene wrote: Dick No problem, i got the same solution working with MM,MS-SQL and Oracle drivers without any problem. You, likely, saved me several hours of frustration. Now the ideal solution would be to return Complex Objects/Types(Structs,ResultSets) back to CFMX. Havent had a chance to play with Structs(CFMX-Java) compatibility. Is there value to the Java developer (new or experienced) to inline code -- Yes, I understand your need. A while ago, we looked at the generated Java code(Real Ugly!) from a *.cfm page. A lot of ugly wrappers coverting loose *.cfm TYPES to strong Java Types..(Result..Slow pages)(Topic Jsp vs Cfm). InLine Java Code. If this ever happens, ideally.. CFMX complier should create a helper class file and let Java Complier, compile it like a Jsp page.. this would be excellent.. but again IS'nt CfObject doing the same thing?(seperating the helper/model class from presentation)...Am trying to relate to Inline Java.. So what overall advantage do we get with Inline Java? Any Performance...? other than coding between CF/Java in templates? I am not against InLine Java.. just trying to understand the Mechanics. Joe On Tue, 26 Nov 2002 07:10:11 -0800 Dick Applebaum [EMAIL PROTECTED] wrote: Joe Your example, does, in fact work. Of course, I needed to modify the Java code to specify a different database -- none of the MS databases appear to work on Mac OS X (or and non-win platform) :) This is enough to get me started -- I will add the flexibility to the interface so it will work with any JDBC driver, and any MetaData request. Thanks I have never written a wrapper for a Java program it helps to start with a working example, and concise instructions. You, likely, saved me several hours of frustration. I think that implementing and deploying this example is a good illustration of the value of inline Java. Someone new to Java, like myself, could take your example and drop it into a simpleCF template, between tags. Then they could add the CFML portion in the same template. More likely, you would have provided a complete, standalone CF Template with the Java code, inline. Then they could save and test the template without concern for: 1) Separating your file into its Java and CFML component parts. 2) Where to put the Java source 3) How to compile the Java class 4) Which Java compiler options to use and their proper settings -- things such as: Usage: javac where possible options include: -gGenerate all debugging info -g:none Generate no debugging info -g:{lines,vars,source}Generate only some debugging info -OOptimize; may hinder debugging or enlarge class file -nowarn Generate no warnings -verbose Output messages about what the compiler is doing -deprecation Output source locations where deprecated APIs are used -classpath Specify where to find user class files -sourcepath Specify where to find input source files -bootclasspath Override location of bootstrap class files -extdirsOverride location of installed extensions -d Specify where to place generated class files -encoding Specify character encoding used by source files -target Generate class files for specific VM version 5) Figuring out the command line interface or some Java IDE, just to be able to compile the Java program. 6) Where to put the Java class 7) Where to get a Java compiler if one isn't installed on their platform (Mac OS X comes, standard, with a JDK, but many platforms do not). Sure, these are things that the new Java person will need to learn eventually. But, is it necessary to overload the new Java user with all this minutiae
Re: Java in CF (CFMX)
On Tuesday, November 26, 2002, at 01:35 PM, Joe Eugene wrote: I understand your need. A while ago, we looked at the generated Java code(Real Ugly!) from a *.cfm page. A lot of ugly wrappers coverting loose *.cfm TYPES to strong Java Types..(Result..Slow pages)(Topic Jsp vs Cfm). I remember that thread -- the generated Java code was Slow Ugly. Someone (maybe me), posted that strong typing in CFML would allow the CF parser to generate better Java code. InLine Java Code. If this ever happens, ideally.. CFMX complier should create a helper class file and let Java Complier, compile it like a Jsp page.. this would be excellent.. but again IS'nt CfObject doing the same thing?(seperating the helper/model class from presentation)...Am trying to relate to Inline Java.. So what overall advantage do we get with Inline Java? Any Performance...? other than coding between CF/Java in templates? I am not against InLine Java.. just trying to understand the Mechanics. I think you could get an interface between no-typing and strong typing I think you would be more easily do develop and test the parts of your program that you needed (or decided) to code in Java. The inline code likely would be more efficient that CF parser generated code, so yes there would be a performance gain (when warranted). You might be developing a routine that will be ultimately deployed as a separate Java program (invoked with cfobject) -- it could be more convenient to develop and debug the Java inline, along with the CFML. The dbMetaData example illustrates one advantage of inline Java. Say you want to change the program(s) slightly so they return a list of db tables, and the columns within each table. On the presentation side, you want to display the combined list in a select box. Here' s what you do, presently: 1) display the Java source 2) modify the Java source. 3) save the Java source 4) switch to a CLI window 5) compile the Java source 6) switch to the CF source 7) modify the CF source 8) save the CF source 9) switch to a browser window 10) invoke the cf template Here's what you would do with inline Java 1) display the combined CF source with the inlineJava source 2) modify the inline Java source. 3) modify the CF source 4) save the combined CF source with the inlineJava source 5) switch to a browser window 6) invoke the cf template Now, you might say You only save 4 steps!! -- but that's 40% of the steps. and they are repeated many times. You would be eliminating 40% of the interactions, 40% of the distractions, 40% of the opportunities to make a mistake. It means productivity! I hope this helps answer your question -- I really don't under stand what a helper/model class is, yet! As an aside, does Java recognize a construct similar to a hash or a CF Structure, that could be passed between CFML Java. ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
Re: Java in CF (CFMX)
Rob Are you saying that you need to restart CFMX to install a new Java class. Now there's a convenient, user-friendly, implementation. If what you say is true, I think you have just made the case for inline Java -- at least for developers Do you mean that a CF production house, running clusters, and all that, need to recycle the whole system, say just to fix a bug in a Java tag? Do people put up with this? Is this true of CFMXJ2ee? Is this true on pure Java appservers like WebSphere, etc? I recycled CFMX the new Java class was recognized. -- Head shaking in disbelief--- Dick On Tuesday, November 26, 2002, at 02:29 PM, Rob Rohan wrote: ah, the fun of writting cf java tags. After you make a change and recompile, you'll need to cycle the service to re-read the class file... unless there is a better way that I don't know about. Rob http://treebeard.sourceforge.net http://ruinworld.sourceforge.net Scientia Est Potentia -Original Message- From: Dick Applebaum [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 26, 2002 2:21 PM To: CF-Talk Subject: Re: Java in CF (CFMX) Joe I have been modifing with your Java code to return tables and columns and I ran into a weird situation. for convenience, I put the ,java file in WEB-INF/classes I recompile the program and get a class file I run the CF template, but get the old version of the class file I even deleted the class file -- something is being cached, somewhere -- Where? TIA Dick On Tuesday, November 26, 2002, at 01:35 PM, Joe Eugene wrote: Dick No problem, i got the same solution working with MM,MS-SQL and Oracle drivers without any problem. You, likely, saved me several hours of frustration. Now the ideal solution would be to return Complex Objects/Types(Structs,ResultSets) back to CFMX. Havent had a chance to play with Structs(CFMX-Java) compatibility. Is there value to the Java developer (new or experienced) to inline code -- Yes, I understand your need. A while ago, we looked at the generated Java code(Real Ugly!) from a *.cfm page. A lot of ugly wrappers coverting loose *.cfm TYPES to strong Java Types..(Result..Slow pages)(Topic Jsp vs Cfm). InLine Java Code. If this ever happens, ideally.. CFMX complier should create a helper class file and let Java Complier, compile it like a Jsp page.. this would be excellent.. but again IS'nt CfObject doing the same thing?(seperating the helper/model class from presentation)...Am trying to relate to Inline Java.. So what overall advantage do we get with Inline Java? Any Performance...? other than coding between CF/Java in templates? I am not against InLine Java.. just trying to understand the Mechanics. Joe On Tue, 26 Nov 2002 07:10:11 -0800 Dick Applebaum [EMAIL PROTECTED] wrote: Joe Your example, does, in fact work. Of course, I needed to modify the Java code to specify a different database -- none of the MS databases appear to work on Mac OS X (or and non-win platform) :) This is enough to get me started -- I will add the flexibility to the interface so it will work with any JDBC driver, and any MetaData request. Thanks I have never written a wrapper for a Java program it helps to start with a working example, and concise instructions. You, likely, saved me several hours of frustration. I think that implementing and deploying this example is a good illustration of the value of inline Java. Someone new to Java, like myself, could take your example and drop it into a simpleCF template, between tags. Then they could add the CFML portion in the same template. More likely, you would have provided a complete, standalone CF Template with the Java code, inline. Then they could save and test the template without concern for: 1) Separating your file into its Java and CFML component parts. 2) Where to put the Java source 3) How to compile the Java class 4) Which Java compiler options to use and their proper settings -- things such as: Usage: javac where possible options include: -gGenerate all debugging info -g:none Generate no debugging info -g:{lines,vars,source}Generate only some debugging info -OOptimize; may hinder debugging or enlarge class file -nowarn Generate no warnings -verbose Output messages about what the compiler is doing -deprecation Output source locations where deprecated APIs are used -classpath Specify where to find user class files -sourcepath Specify where to find input source files -bootclasspath Override location of bootstrap class files -extdirsOverride location of installed extensions
RE: Java in CF (CFMX)
Again, I could be totally misinformed - I only write cfx_ tags at home with a dev edition and it's not too bad typing $/opt/coldfusionmx/bin/coldfusion stop $/opt/coldfusionmx/bin/coldfusion start (i dont trust restart) Then take them to work and acctuallly add them to live server (which I restart) But I would dig auto-reload - if it's not already there. Rob http://treebeard.sourceforge.net http://ruinworld.sourceforge.net Scientia Est Potentia -Original Message- From: Dick Applebaum [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 26, 2002 3:03 PM To: CF-Talk Subject: Re: Java in CF (CFMX) Rob Are you saying that you need to restart CFMX to install a new Java class. Now there's a convenient, user-friendly, implementation. If what you say is true, I think you have just made the case for inline Java -- at least for developers Do you mean that a CF production house, running clusters, and all that, need to recycle the whole system, say just to fix a bug in a Java tag? Do people put up with this? Is this true of CFMXJ2ee? Is this true on pure Java appservers like WebSphere, etc? I recycled CFMX the new Java class was recognized. -- Head shaking in disbelief--- Dick On Tuesday, November 26, 2002, at 02:29 PM, Rob Rohan wrote: ah, the fun of writting cf java tags. After you make a change and recompile, you'll need to cycle the service to re-read the class file... unless there is a better way that I don't know about. Rob http://treebeard.sourceforge.net http://ruinworld.sourceforge.net Scientia Est Potentia -Original Message- From: Dick Applebaum [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 26, 2002 2:21 PM To: CF-Talk Subject: Re: Java in CF (CFMX) Joe I have been modifing with your Java code to return tables and columns and I ran into a weird situation. for convenience, I put the ,java file in WEB-INF/classes I recompile the program and get a class file I run the CF template, but get the old version of the class file I even deleted the class file -- something is being cached, somewhere -- Where? TIA Dick On Tuesday, November 26, 2002, at 01:35 PM, Joe Eugene wrote: Dick No problem, i got the same solution working with MM,MS-SQL and Oracle drivers without any problem. You, likely, saved me several hours of frustration. Now the ideal solution would be to return Complex Objects/Types(Structs,ResultSets) back to CFMX. Havent had a chance to play with Structs(CFMX-Java) compatibility. Is there value to the Java developer (new or experienced) to inline code -- Yes, I understand your need. A while ago, we looked at the generated Java code(Real Ugly!) from a *.cfm page. A lot of ugly wrappers coverting loose *.cfm TYPES to strong Java Types..(Result..Slow pages)(Topic Jsp vs Cfm). InLine Java Code. If this ever happens, ideally.. CFMX complier should create a helper class file and let Java Complier, compile it like a Jsp page.. this would be excellent.. but again IS'nt CfObject doing the same thing?(seperating the helper/model class from presentation)...Am trying to relate to Inline Java.. So what overall advantage do we get with Inline Java? Any Performance...? other than coding between CF/Java in templates? I am not against InLine Java.. just trying to understand the Mechanics. Joe On Tue, 26 Nov 2002 07:10:11 -0800 Dick Applebaum [EMAIL PROTECTED] wrote: Joe Your example, does, in fact work. Of course, I needed to modify the Java code to specify a different database -- none of the MS databases appear to work on Mac OS X (or and non-win platform) :) This is enough to get me started -- I will add the flexibility to the interface so it will work with any JDBC driver, and any MetaData request. Thanks I have never written a wrapper for a Java program it helps to start with a working example, and concise instructions. You, likely, saved me several hours of frustration. I think that implementing and deploying this example is a good illustration of the value of inline Java. Someone new to Java, like myself, could take your example and drop it into a simpleCF template, between tags. Then they could add the CFML portion in the same template. More likely, you would have provided a complete, standalone CF Template with the Java code, inline. Then they could save and test the template without concern for: 1) Separating your file into its Java and CFML component parts. 2) Where to put the Java source 3) How to compile the Java class 4) Which Java compiler options to use and their proper settings -- things such as: Usage: javac where possible options include: -gGenerate all debugging info -g:none Generate no debugging info -g:{lines,vars,source}Generate only some debugging info -O