|
|
CFDJ TOP LINKS YOU MUST CLICK ON !
Journeyman CF
Compilation and Precompilation in CFMX Templates Part 1
Most of you have heard by now that ColdFusion MX templates are compiled into Java. Some may wonder what the big deal is. Many more of you may be surprised to learn that you can precompile CFMX templates.
Reader Feedback : Page 1 of 1
#9 |
charlie arehart commented on the 26 Mar 2003
Grr. This comment system doesn't respect line breaks, so here it all is again: OK, back in December I learned of one last refinement of my precompile.bat file. I'm so sorry that I've had to offer so many versions. I think this is the last, ultimate, one. And it solves various problems that had occurred while I tried to find this ultimate solution. Again, the following is just 3 lines, 2 sets and the java command: set MX_INSTALL=c:\CFusionMX set PATH=%MX_INSTALL%\runtime\bin;%MX_INSTALL%\runtime\jre\bin;%PATH% java -classpath %MX_INSTALL%\lib\cfusion.jar coldfusion.tools.Compiler -webroot %1 -webinf %MX_INSTALL%\wwwroot\WEB-INF %1
BTW, even though Updater 3 offers a new updater_compile.bat file, it's still not able to address some of the problems that this example does (like compiling code outside the cf root where the WEB-INF directory is).
|
#8 |
charlie arehart commented on the 26 Mar 2003
OK, back in December I learned of one last refinement of my precompile.bat file. I'm so sorry that I've had to offer so many versions. I think this is the last, ultimate, one. And it solves various problems that had occurred while I tried to find this ultimate solution. Again, the following is just 3 lines, 2 sets and the java command: set MX_INSTALL=c:\CFusionMX set PATH=%MX_INSTALL%\runtime\bin;%MX_INSTALL%\runtime\jre\bin;%PATH% java -classpath %MX_INSTALL%\lib\cfusion.jar coldfusion.tools.Compiler -webroot %1 -webinf %MX_INSTALL%\wwwroot\WEB-INF %1 BTW, even though Updater 3 offers a new updater_compile.bat file, it's still not able to address some of the problems that this example does (like compiling code outside the cf root where the WEB-INF directory is). |
#7 |
Charles Arehart commented on the 5 Dec 2002
Oops. Forgot to list the first line of the file. Here it is, now, complete: set MX_INSTALL=c:\cfusionMX %MX_INSTALL%\runtime\bin\java -classpath %MX_INSTALL%\lib\cfusion.jar coldfusion.tools.Compiler -webroot %1 -webinf %MX_INSTALL%\wwwroot\WEB-INF %1
Again, you need to change the first line to reflect wherever you installed CFusionmx.
(It's a shame we can't edit these comments. I'd like to go in and clean them all up!) |
#6 |
Charles Arehart commented on the 5 Dec 2002
OK, sorry to have to correct things yet again, but it turns out that the solution to the updater 1 problem is really the fact that part of the compile process (when using the -f directive) seems to be needing the 1.4 JDK. You can get that (at least in my testing) by changing the second line in the command above to start with this instead: %MX_INSTALL%\runtime\bin\java %MX_INSTALL%\lib\cfusion.jar coldfusion.tools.Compiler -webroot %1 -webinf %MX_INSTALL%\wwwroot\WEB-INF %1 That's 2 lines, with the second starting with a pointer to the runtim=bin rather than the runtime\jre\bin that I pointed to in the previous comment. Hope that helps folks. |
#5 |
Charles Arehart commented on the 23 Nov 2002
Folks, I've learned that since the writing of this, the (Updater 1 for CFMX ) has broken the -f switch I mention for forcing a recompile. There's hope that this is addressed in Updater 2, as I've heard from some in MM. |
#4 |
charles arehart commented on the 11 Nov 2002
Folks, while I warn in the article that you should not try to precompile your entire default cfusionmx\wwwroot directory, someone has just shared with me an experience that offers another reason not to. I'll share it for those who may be interested. He had tried to run the precompile against it and got thousands of pages in error. Now, why he got so many errors is one thing. It may have been that his directory names included some with blank spaces (the precompiler doesn't like that, and will cause errors in compiling templates within them). But more curious was that because of the errors, he was then unable to then execute the code in CFMX. Here are his comments: > Those who want to compile an entire site or massive directory, may want to proceed with extreme caution. When I tried to do that it and got a boatload of error messages, it had a NASTY side effect. >After compiling I did a refresh on my local site and BOOM; gone, dead. Every CFM template including the CF admin site, all resulted in page cannot be displayed. Restarting the CFMX server did no good. Finally the only thing that worked was to delete all of the java files that I had compiled and reboot the box. This finally restored CFMX to service again. --- So, forewarned is forearmed. It seems that failures during the compile process cause a .java file to be left in the CFCLASSES directory (mentioned in the article) that then prevent the normal automatic compilation of code to even work. Yikes! |
#3 |
charles arehart commented on the 4 Nov 2002
Let's see if I can format this well for display. It should be: set MX_INSTALL=d:\cfusionMX %MX_INSTALL%\runtime\jre\bin\java -classpath %MX_INSTALL%\lib\cfusion.jar coldfusion.tools.Compiler -webroot %1 -webinf %MX_INSTALL%\wwwroot\WEB-INF %1 |
#2 |
charles arehart commented on the 4 Nov 2002
Gads! Somehow the version of the precompile.bat file that was printed is missing some important code! :-( It should be: set MX_INSTALL=d:\cfusionMX %MX_INSTALL%\runtime\jre\bin\java -classpath %MX_INSTALL%\lib\cfusion.jar coldfusion.tools.Compiler -webroot %1 -webinf %MX_INSTALL%\wwwroot\WEB-INF %1 As the article indicates, it's just 2 lines, the first being the SET and the second starting with %MX_INSTALL%. But the printed version was somehow missing the beginning of the second line: %MX_INSTALL%\runtime\jre\bin\java -classpath So sorry for that printing mistake! One other thing I've learned since writing the article is that it seems to fail to work if a directory name or file name being precompiled has spaces in the name. |
#1 |
Dennis Kovalev commented on the 18 Oct 2002
|
YOUR FEEDBACK  | CFImage Functionality is
Just Awesome! By Ben Nadel Michael wrote: The noisy
ad is beyond annoying. |  | Food Dial, a Facebook RIA
Application Written in
Flex By Yakov Fain M@ wrote: I really like
the UI, although choosing
from the outer wheel is a
little complicated - you
need to be precise.
I was going to complain
there wasn't much data in
there - until I realized
that's the point! So I
uploaded a recipe and had
to add most of the
ingredients to... |  | 'Jazz' up Your
Applications with Open
Source Java By Darron J. Schall Stephen Boston wrote: The
Jazzy source code link in
the article works and I
could download it just
fine.
But having never used
Eclipse before I was a
bit thrown off by where
to place the Jazzy com
folder. It goes in src I
discovered after a bit of
hair pulling. :) Before
I d... |  | Viewpoint: Not Every
ColdFusion Developer
Should Be A Flex
Developer By Andrew Powell Adobe Staffer wrote:
Maybe you should change
the title to Things to
Consider When Developing
Flex Applications. It's
not necessary to belittle
other CF developers who
may have had challenges
adapting to Flex. |  | VirtenSys Demonstrates
PCI Express Based I/O
Virtualization By Virtualization News Desk Virtualization news for
the channel community and
you ! wrote: Trackback
Added: VirtenSys
Demonstrates PCI Express
Based
I/O Virtualization;
VirtenSys has developed a
PCI Express based I/O
technology that
virtualizes and shares
off-the-shelf I/O
adapters among multiple
... |
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS
|
SYS-CON FEATURED WHITEPAPERS BREAKING NEWS FROM THE WIRES  | Clear Data Builder 3.0 is
Free Now The popular code
generator Clear Data
Builder will become
available free of charge.
Originally, Clea | AJAX World - Cooking CRUD
with Flex and BlazeDS In today's cooking class
you'll add to your
cookbook a delicious
recipe. It's quick and
won't cost | Building an IM Bot Using
ColdFusion I recently brought a
Google Talk bot that I
put online at
cfdocs@gmail.com. Google
Talk users can ad | Cornerstones of
Virtualization: I/O
Virtualization Defined Recently I talked about
what I see as the next
'waves of virtualization'
taking the industry, I
talk | Engelbart's Usability
Dilemma: Efficiency vs
Ease-of-Use The mouse was the
original idea of Doug
Engelbart who was the
head of the Augmentation
Research Cent | Web 2.0 Is Fundamentally
About Empowering People 'Unlocking content to be
remixed into new business
value' is the driver of
Web 2.0 in the enterprise | All-New AJAX Security
Bootcamp Next Week at
AJAXWorld in New York Being held for the first
time on March 18, 2008 at
the historic Roosevelt
Hotel in New York City,
AJ | Zend Studio for Eclipse In my many years of
programming, almost 20
years now, I have used
countless integrated
development e | Building SOA with Tuscany
SCA Many articles have
already been written
about service-oriented
architecture (SOA) and
Service Compon | CFImage Part 3 ColdFusion 8 introduces
the CFImage tag and
dozens of image
manipulation functions.
We have already | Every Beginner Must Grow
Up Do you remember January
of 2004? Macromedia had
just released ColdFusion
6.1 a few months earlier.
C | Working with the Apache
Derby Database and
ColdFusion Early releases of
ColdFusion (under
Allaire) focused on the
Windows market and it was
common to incl | CFImage Part 2 ColdFusion 8 has a load
of awesome image
manipulation
functionality. So much
so, in fact, that it wi | Test Driving ColdFusion 8 Of course, since this is
ColdFusion I expected
nothing less than this,
i.e., powerful AJAX
functiona | Using the Adobe Flex
Toolkit for
Salesforce.com In April 2007 Adobe and
Salesforce.com announced
the availability of the
Flex toolkit for Apex,
Sale | An Introduction To Adobe
Flex For ColdFusion
Developers There's been a lot of
talk in the ColdFusion
community lately about
the newly released Flex
2. If yo | Flex and ColdFusion
Hybrid Application with
ServiceFactory Whether it's in factories
or workshops, in mines or
forests, in offices or
homes, or even in our sac | ColdFusion Frameworks:
ColdBox 2.0.3 Released This release is the first
one to include
contributed content from
Rob Gonda, Tom de
Manincor, Brian | ColdFusion Feature
— Coding with XML As a ColdFusion
developer, hopefully by
now you have heard at
least a little about XML
(eXtensible M | Your First Adobe Flex
Application with a
ColdFusion Backend Flex is a complete set of
tools to develop rich
Internet cross-platform
applications based on the
Fl |
|