I don't know if it helps but we have several spots were we needed to call into Mach II apps using cfmodule and had to create our own custom boostraper like Peter says. I would be happy to share with you if you like. Basically all I did was remove some of the cfsetting tags.
--Kurt On Mon, Aug 30, 2010 at 2:30 PM, Dave Ross <[email protected]> wrote: > Peter, > > Agree with everything you said below. This is definitely a fringe use > case. We'll look into rolling our own bootstrapper for mach-ii, or > adjusting our wrappers to call the mach-ii app first and turn off > enablecfoutputonly (2x). This is basically a battle of "which solution > is worse". > > Thanks for your help... > > -Dave > > On Mon, Aug 30, 2010 at 2:51 PM, Peter J. Farrell <[email protected]> wrote: >> Ah, thanks for the use case -- that changes a lot of assumptions about >> the request that the bootstrapper assumes. More inline below. ;-) >> >> Dave Ross said the following on 08/30/2010 01:04 PM: >>> 3) There seems to be a difference in whether mach-ii.cfc vs. >>> mach-ii.cfm is used. I'm confused about this code (it's similar in >>> both files): >>> >>> <cfprocessingdirective suppresswhitespace="true"><cfcontent >>> reset="true" /><cfsetting enablecfoutputonly="true" /><cfset >>> application[MACHII_APP_KEY].appLoader.getAppManager().getRequestHandler().handleRequest() >>> /><cfsetting enablecfoutputonly="true" /></cfprocessingdirective> >>> >> >> The bootstrapper wasn't designed for it to be included via cfinclude >> into another application. We've been criticized for having bad >> whitespace suppression (most of the fault is CF and the lack of controls >> available to us) so we decided it was time to hit the whitespace >> generation issue hard. The side affect was what you are seeing -- I >> don't think it's a common issue as this is the first time it's been >> brought up (including a mach-ii application in another via the >> mach-ii.cfm bootstrapper). In general, I think the majority of Mach-II >> applications are "stand-alone" in nature and that's the common approach >> we take towards development. Not saying you're use case is wrong -- >> it's completely valid. >> >> Also, mach-ii.cfm is deprecated as of Mach-II 1.6. You could use a >> cfmodule call instead to the index.cfm file -- I know some people that >> do that. >> >>> Why are we: >>> >>> a) resetting the output buffer (this breaks the ability to include >>> a mach-ii app inside any other cfml construct (mach-ii "owns" the >>> request at that point) >>> >> >> Yea, it really depends on your integration point -- I think most people >> have moved on to Application.cfc. There you can programmatically call >> handleRequest() depending on whether or not the request should be >> handled by Mach-II itself. >> >>> b) setting enablecfoutputonly="true" twice? I think this is why I >>> have to turn it off twice. >>> >>> >> Yep, definitely seems to be the what is going on. My suggestion to to >> create a custom bootstrapper (copy the mach-ii.cfm file) which make it >> work the way it needs for your integration point. It's the least >> invasive option at this point for you. >> >> Would you be willing to write up a FAQ for the wiki? It would be great >> to have this on the wiki for future reference. Maybe there is a better >> way to handle this (i.e. white-space suppression) but I don't any ideas >> at the moment. >> >> HTH, >> .pjf >> >> -- >> You received this message because you are subscribed to Mach-II for CFML >> list. >> To post to this group, send email to [email protected] >> To unsubscribe from this group, send email to >> [email protected] >> For more options, visit this group at >> http://groups.google.com/group/mach-ii-for-coldfusion?hl=en >> >> ***New URLs as of April 29th, 2010*** >> SVN: http://svn.mach-ii.com/machii/ >> Wiki / Documentation / Tickets: http://trac.mach-ii.com/machii/ >> > > -- > You received this message because you are subscribed to Mach-II for CFML list. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/mach-ii-for-coldfusion?hl=en > > ***New URLs as of April 29th, 2010*** > SVN: http://svn.mach-ii.com/machii/ > Wiki / Documentation / Tickets: http://trac.mach-ii.com/machii/ > -- You received this message because you are subscribed to Mach-II for CFML list. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/mach-ii-for-coldfusion?hl=en ***New URLs as of April 29th, 2010*** SVN: http://svn.mach-ii.com/machii/ Wiki / Documentation / Tickets: http://trac.mach-ii.com/machii/
