Re: Query of Queries question
You could also add a RowNumber column to your query: Then, do: SELECT * FROM qSomeQuery WHERE RowNumber >= 21 AND RowNumber < 41 ORDERY BY LastName Not sure what the performance hit on doing this would be. Jon On 1/5/07, Dave Phillips <[EMAIL PROTECTED]> wrote: > Does anyone know if it's possible to extract a 'subset' of records in a query > utilizing Query of Queries? Basically I want to do something like this: > > > SELECT * > FROM qSomeQuery > WHERE currentRow >= 21 AND currentRow < 41 > ORDERY BY LastName > > > Of course, this doesn't work because currentrow does not specify the row > number inside of a Query, only when you are working with the query results > directly (like qSomeQuery.currentRow). > > Anyone know how this is possible? The only thing I can think of doing is > something like this: > > >*** In here I would build a new query with only the rows available as I > loop through with functions like queryAddRow() and querySetCell(). > > > This idea would not be very efficient, so I'm looking for an alternative > method. > > Thanks for your help in advance! > > Dave > > ~| Create robust enterprise, web RIAs. Upgrade & integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:265888 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: CFScript inside a CFC
Chris, I have not done any benchmarks on cfscript vs. tags, but if there were significant performance differences, I would expect to have heard of these differences by now. Phillip's argument is that there is a difference in compiled code, but I did not see any reason to conclude that there is an observable difference in performance. The popuplar O-O frameworks in CF, like Mach-II and Model-Glue, use tags in the framework code that I have looked at, and those frameworks have had significant time put into them in peformance tuning. Jon On 12/17/06, Christopher Jordan <[EMAIL PROTECTED]> wrote: > Jon, > > Here's a snippet of a discussion my local CFUG just had on this subject > (in reverse order so you can read it top down): > > On 11/28/06, Eric Knipp <[EMAIL PROTECTED]> wrote: > > It was my understanding that > > > > > > if (a eq b) { a = c; } > > > > > > is the same performance-wise as > > > > > > > > > > > > as the CF compiler turns them into the same thing .. I am pretty sure > there > > have been other discussions on this topic. As of CFMX I thought > there was > > no performance difference? > > > > On 11/28/06, Phillip Holmes <[EMAIL PROTECTED]> wrote: > > Nope. Your example may be immeasurable, but with more advanced > > functionality, that is not the case. > > > > Obviously, ColdFusion is middle ware for your middle ware. It is a > > collection of servlets that consolidate Java functionality into one > > tidy command. Calling a tag when you can script it out with one > > cfscript block, simply creates another import and more code in the > > final JIT. If you write the code in cfscript, it is closer to the end > > result (Java) than if CF has to import more servlet libraries to get > > to the final result. > > > > Get yourself a java decompiler, write the code both ways in two > > different files, decompile the JIT, and you'll see what I mean. Most > > of all, turn your debug times on and look at the difference. > > > > --Phillip Holmes > > I think it's actually a pretty common practice. > > Cheers, > Chris > > Jon Gunnip wrote: > > Chris, > > > > I would be wary of using cfscript just for supposed performance gains > > over tags. My understanding is that those gains were eliminated (or > > reduced to the point of insignificance) in CF 6.x and 7.x. Here are > > what I see as the pros and cons of cfscript. These points are largely > > a matter of preference: > > > > Pros of cfscript > > -- more readable > > -- less typing > > -- more like other languages (Java, JavaScript) - sometimes can copy > > Java snippets and they function with little modification in cfscript > > > > Cons > > -- many pieces of cf functionality do not exist in cfscript (e.g. > > throw, dump, abort) or are awkward (looping over queries) - we have a > > CFScript.cfm include with functions like Throw(), Dump(), Abort() to > > get around this, but for cfquery we always use tags > > -- might be inconsistent with other code written in tags; I like to > > see consistency throughout an application > > > > Jon > > > > > > > >> I was told by some members of my local CFUG that > >> writing code within CFScript tags whenever possible is faster (performance > >> wise), so I'm giving it a go. > >> > > > > > > ~| Create robust enterprise, web RIAs. Upgrade & integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:264351 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: CFScript inside a CFC
Chris, I would be wary of using cfscript just for supposed performance gains over tags. My understanding is that those gains were eliminated (or reduced to the point of insignificance) in CF 6.x and 7.x. Here are what I see as the pros and cons of cfscript. These points are largely a matter of preference: Pros of cfscript -- more readable -- less typing -- more like other languages (Java, JavaScript) - sometimes can copy Java snippets and they function with little modification in cfscript Cons -- many pieces of cf functionality do not exist in cfscript (e.g. throw, dump, abort) or are awkward (looping over queries) - we have a CFScript.cfm include with functions like Throw(), Dump(), Abort() to get around this, but for cfquery we always use tags -- might be inconsistent with other code written in tags; I like to see consistency throughout an application Jon > I was told by some members of my local CFUG that > writing code within CFScript tags whenever possible is faster (performance > wise), so I'm giving it a go. ~| Create robust enterprise, web RIAs. Upgrade & integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:264247 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Embed an XML document into another?
Craig, You can't just merge two XML documents together in CF the way you are doing it. Spike has an excellent explanation here: http://www.spike.org.uk/blog/index.cfm?do=blog.cat&catid=8245E3A4-D565-E33F-39BC6E864D6B5DAA. One simple approach you can take is to turn both the XML documents into strings using ToString(), insert one of the strings into the other using a regex, and then use XMLParse() on the combined XML string to get a new XML object. HTH, Jon On 10/11/06, Craig Drabik <[EMAIL PROTECTED]> wrote: > I have an application that kicks around data about an event from function to > function in an XML document. If I have an error I'm trapping with > try/catch, I want to use wddx to serialize the cfcatch struct, parse it to > XML, and embed it in the error element in my event XML. > > if I try: > > > > > xError = xmlparse(replace(errorXml, 'wddxPacket', 'wddx-packet', > 'ALL')); //Stops CF fromseeing a wddx packet "type" > structInsert(xEvent.event.error, "wddx-packet", xError); > > > I get: > > The XML node [#document] has type [DOCUMENT] which cannot be added to the > content of an element. > > In order to get a node, not a document, if I replace: > > structInsert(xEvent.event.error, "wddx-packet", xError); > > with: > > structInsert(xEvent.event.error, "wddx-packet", x["wddx-packet"]); > > I get: > > WRONG_DOCUMENT_ERR: A node is used in a different document than the one that > created it. > > > > Anybody have any ideas? > > ~| 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:256539 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Does anybody "really" understand character encodings?
We've only support ASCII in our database and so we handle the paste from Word issue by identifying the most common non-ASCII Word characters and replacing them with ASCII equivalents: Replace(Local.Text, chr(8211), "-", "all"); /* short dash from MS Word */ Replace(Local.Text, chr(8212), "--", "all"); /* long dash from MS Word */ Replace(Local.Text, chr(8216), "'", "all"); /* left single quote from MS Word */ Replace(Local.Text, chr(8217), "'", "all"); /* right single quote from MS Word */ Replace(Local.Text, chr(8220), '"', "all"); /* left double quote from MS Word */ Replace(Local.Text, chr(8221), '"', "all"); /* right double quote from MS Word */ We identify the Word chr() equivalent by pasting the Word characters into a textarea, submitting to the server, and then looping over the characters: WriteOutput(myChar & ": " & asc(myChar)). Jon On 9/15/06, Paul Hastings <[EMAIL PROTECTED]> wrote: > Block, Jon wrote: > > - copy/paste from microsoft word > > probably windows-1252 superset of latin-1 which often confuses people. > > > - XML export from InDesign UTF-16 > > to simplify things it would be best to try to get utf-8 out of this > thing. or at least which "endian" it is. > > > - XML export from Quark > > from i remember, these yahoos refused to support unicode. i guess they > might have changed since then (4-5 years ago). > > > In all 3 of the cases I've described above, the orign software is > > putting through characters that do not display correctly on the web. > > depends on the encoding of your web application, database, etc. AND how > stable the encodings are coming out of your 3 data sources (plus > whatever hijinks the user OS gets up when they do copy & paste). > > > The problem I'm having is that some of the characters such as an > > ellipsis mark or hyphen. When I run into these characters, they display > > as the wrong character... sometimes a question mark. Othertimes a square > > box... yet other times sequences of characters that are just totally > > crazy. > > a box is simply that the browser can't render that char using the given > font family, usually easily fixed. a question mark is another, sad, > story. it means the data is garbaged usually from mixing up encodings. > > > My basic understanding of character encoding tells me that I want to > > reduce all of the characters down to ASCII. I do not know a good way to > > do this. > > why? you will eventually lose information & perhaps context of some > text. it would be better to normalize your encodings on unicode (utf-8). > fits w/cf, & easy enough to use/understand. > > > How can I accept text from each of the above mentioned sources, perhaps > > others, and somehow *normalize* all of the character data into a set of > > characters that will display properly on my page every time? > > converting to unicode, there are plenty of tools around for this. the > next release of icu4j is supposed to have some heavy duty tools (there > is a fairly good charset detector in the current version, but it's not > foolproof but then again hardly anything is when it comes to this). > quark export is probably going to be the most fun to handle. > > > > ~| 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:253274 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: OT: log files contain screen resolution
For the webserver to capture it, I think it would have to be sent with an HTTP request (e.g. as a CGI variable) which I don't think it is. We caputre this information via JavaScript by setting the JS variables screen.width and screen.height into a hidden form variable and then processing it on the server. Jon On 9/13/06, Chad Gray <[EMAIL PROTECTED]> wrote: > Sorry for the off topic, but I cant find an answer so far. > > Can Apache's log files pick up the users screen resolution? Can any web > servers's log files? > > Or is this something you need to add yourself to track? > > > > > ~| 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:252996 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Multiple CF instances sharing single IIS site
Snake, Thanks for the feedback. The charting request does not run in the correct CF instance because the IIS mapping must hardcode requests to /CFIDE to a particular CF instance. I just searched the JRun directory for "CFIDE" and found that I could get the following to get the charting to work on multiple instances, but it is a little tedious, and I don't know if there are other things besides charting that would need tweaking. 1) create a Virtual Directory /CFIDE2 in IIS pointing to the CFIDE directory 2) edit cfusion.ear\cfusion.war\WEB-INF\cfusion\lib\neo-graphing.xml in instance 2 changing /CFIDE/GraphData.cfm to /CFIDE2/GraphData.cfm 3) edit cfusion.ear\cfusion.war\WEB-INF\web.xml in instance2 changing /CFIDE/GraphData to /CFIDEA/GraphData and /CFIDE/GraphData.cfm to /CFIDEA/GraphData.cfm 4) restart everything I'm interested if there is a better way to do it. Jon On 9/11/06, Snake <[EMAIL PROTECTED]> wrote: > This is actually a problem I have found when using multiple instances. You > have to use the CFIDE of the default (cfusion) instance otherwise everything > doesn't work properly. I never figured out why. I think you will find that > the code still actually runs on the correct instance though as in the case > of cfchart as graphdata.cfm doesn't actually exist, the request is > intercepted by the java servlet. ~| 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:252769 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Multiple CF instances sharing single IIS site
Hi, I have about 15 web applications on a single website. One app comprises about 75% of the server usage, and I would like to isolate this app in its own CF instance. I'm using IIS 6.0 on Windows Server 2003. I have three CF instances and a JRUN connector for each. One instance is for the default cfusion instance which I only use to manage my instances and to create new instances. A second intance is for all but on of the web apps, and a third is for the large app I want to isolate. Everything is working with the exception of how to manage the CFIDE directory. To do charting with cfcharts, the charts reference /CFIDE/GraphData.cfm and the /CFIDE directory has to be associated with the JRUN connector for the CF instance generating the chart. So, if there can only be on /CFIDE directory on the website, how can I get each instance to have a CFIDE directory of its own for charting (and other things an instance might use the CFIDE directory for)? Thanks! Jon ~| 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:252753 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: XSLT selecting a sibling value to the current node
parent::title matches only if the parent tag of the current node is a . I would grab title sibling the way you did it. Jon On 8/30/06, Ian Skinner <[EMAIL PROTECTED]> wrote: > Ok I got this to work, but I'm not sure why this way works but my original > does not. > > This works: > > > This does not: > > > Anybody care to expand on that? > > -- > Ian Skinner > Web Programmer > BloodSource > www.BloodSource.org > Sacramento, CA > > - > | 1 | | > - Binary Soduko > | | | > - > > "C code. C code run. Run code run. Please!" > - Cynthia Dunning > > Confidentiality Notice: This message including any > attachments is for the sole use of the intended > recipient(s) and may contain confidential and privileged > information. Any unauthorized review, use, disclosure or > distribution is prohibited. If you are not the > intended recipient, please contact the sender and > delete any copies of this message. > > > > > ~| 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:251657 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: SOT XSLT Content is not allowed in prolog.
Ian, Is the XMLTransform() throwing the "content in prolog" error or is the XMLParse()? It looks like your output from the XMLTransform() might not be valid XML and hence would throw an error in XMLParse(). Jon On 8/30/06, Ian Skinner <[EMAIL PROTECTED]> wrote: > Can anybody point out where I have content in a prolog? > > > http://www.w3.org/1999/XSL/Transform"; > version="1.0"> > > > > > , > 0 > > > > > > That is used in this line. > > > > -- > Ian Skinner > Web Programmer > BloodSource > www.BloodSource.org > Sacramento, CA > > - > | 1 | | > - Binary Soduko > | | | > - > > "C code. C code run. Run code run. Please!" > - Cynthia Dunning > > Confidentiality Notice: This message including any > attachments is for the sole use of the intended > recipient(s) and may contain confidential and privileged > information. Any unauthorized review, use, disclosure or > distribution is prohibited. If you are not the > intended recipient, please contact the sender and > delete any copies of this message. > > > > ~| 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:251536 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: CFCUnit cons and pros
One major benefit of unit testing is that you can test your Model before having a functional GUI in place. This lets you isolate problems in the Model to the Model rather than tracing them through the View and Controller as well. I really see the benefits of CFCUnit and unit testing in general in the maintenance phase of an application. As I am making changes, I rerun the tests to see what I broke. It saves a lot of time that would otherwise be spent stepping through the GUI. Thus, all other things being equal, the more maintenance you plan to do on an app (e.g. significantly adding features or generally making changes), the more you will see the benefit of tools like CFCUnit. As a word of caution, I've found it can take a lot of thought to successfully design unit tests, especially when the relationships between your CFC's are complex and there are database interactions involved. I often hear unit testing brought up as "something you should do" but no mention that it can be quite challenging to do well. Jon On 7/20/06, Aaron Rouse <[EMAIL PROTECTED]> wrote: > I think it can be really dependent on how your CFCs are coded and used > as to what the pros and cons are. I have used CFCUnit on some > projects that the huge pro was that it saved an enormous amount of > time then on other projects it would have taken more time to use it > over just putting the CFCs to some "manual" testing. > > On 7/20/06, Asim Manzur <[EMAIL PROTECTED]> wrote: > > I am actually working to prepare the presentation for my organization and > > mention what are the cons and pros using CFCUnit vs doing the manual unit > > testing. > > > > google didn't give me any good article/summary result. > > > > Can someone help me about this. > > > > -- > > Regards, > > > > > > > > ~| 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/cf_lists/message.cfm/forumid:4/messageid:247253 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: onError not firing
I posted a couple weeks ago with the same issue. I concluded that onError() does not fire for webservices. Thanks for submitting a bug/request to Adobe. That is what I should have done originally. See: http://houseoffusion.com/cf_lists/message.cfm/forumid:4/messageid:245568 Jon On 7/19/06, Robertson-Ravo, Neil (RX) <[EMAIL PROTECTED]> wrote: > After an offline discussion uth Ray, and unless someone can tell me > different, it looks like this is a bug with the way onError is triggered > when an error is thrown inside a CFC being called via a Web Service... Best > log it... > > > > > > > > > "This e-mail is from Reed Exhibitions (Oriel House, 26 The Quadrant, > Richmond, Surrey, TW9 1DL, United Kingdom), a division of Reed Business, > Registered in England, Number 678540. It contains information which is > confidential and may also be privileged. It is for the exclusive use of the > intended recipient(s). If you are not the intended recipient(s) please note > that any form of distribution, copying or use of this communication or the > information in it is strictly prohibited and may be unlawful. If you have > received this communication in error please return it to the sender or call > our switchboard on +44 (0) 20 89107910. The opinions expressed within this > communication are not necessarily those expressed by Reed Exhibitions." > Visit our website at http://www.reedexpo.com > > -Original Message- > From: Raymond Camden <[EMAIL PROTECTED]> > To: CF-Talk > Sent: Wed Jul 19 16:09:46 2006 > Subject: Re: onError not firing > > Ah. EventName should be required=false. It's only passed when the > error occurs in an App.cfc method. > > On 7/19/06, Robertson-Ravo, Neil (RX) > <[EMAIL PROTECTED]> wrote: > > That code does indeed error as expected, but still no fire of onError... > > > > Here is my onError...it could well have a problem - I have been staring at > > it long enough not to see!! > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -Original Message- > > From: Raymond Camden [mailto:[EMAIL PROTECTED] > > Sent: 19 July 2006 16:00 > > To: CF-Talk > > Subject: Re: onError not firing > > > > If you make another error, something simple, like > > > > #x# (where x is not defined) > > > > Does your onError work? If not, you have an error in your onError. > > Maybe you could post the code? > > > > > > On 7/19/06, Robertson-Ravo, Neil (RX) > > <[EMAIL PROTECTED]> wrote: > > > OK, > > > > > > This is an odd one - I have a web service call which works a treat, but > I > > am > > > now getting to the error trapping / logging parts. I want to use > onError > > > from within my Application.cfc, so I went into my remote method and > > changed > > > the following working line: > > > > > > > > application.Response.init(XmlParse(arguments.novaRequest))> > > > > > > To > > > > > > > > application.Responsex.init(XmlParse(arguments.novaRequest))> > > > > > > Now, this is erroring as expected but what it seems to be doing is never > > > triggering the onError method of the Application.cfc. Then only time I > > can > > > get it to trigger is when I explicitly invoking the method directly. I > > know > > > it is not being called as I have placed a cflog call in the method which > > > never writes to he log dir. - the onRequestStart and OnRequestEnd > methods > > > *DO* log? > > > > > > I know Application.cfc is firing as, as you can see above I am > referencing > > > application level objects > > > > > > What the hell is going on? Why did my enforced error not get thrown to > > > onError?! > > > > > > This e-mail is from Reed Exhibitions (Oriel House, 26 The Quadrant, > > > Richmond, Surrey, TW9 1DL, United Kingdom), a division of Reed Business, > > > Registered in England, Number 678540. It contains information which is > > > confidential and may also be privileged. It is for the exclusive use of > > the > > > intended recipient(s). If you are not the intended recipient(s) please > > note > > > that any form of distribution, copying or use of this communication or > the > > > information in it is strictly prohibited and may be unlawful. If you > have > > > received this communication in error please return it to the sender or > > call > > > our switchboard on +44 (0) 20 89107910. The opinions expressed within > > this > > > communication are not necessarily those expressed by Reed Exhibitions. > > > Visit our website at http://www.reedexpo.com > > > > > > > > > > > > > > > > > > ~| 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/cf_lists/message.cfm/forumid:4/messageid:247088 Subscription: http://www.houseoffusion.com/lists.cfm/link=
Re: Where do we webservice exceptions go?
Tom, OnError() in Application.cfc is ignored for webservices. The entire Application.cfc isn't ignored for web services, however, since you can do things in OnRequestStart(). I used the following test component. I didn't try the site-wide error handler, but I assume since a webservice does not return HTML to the requestor, it would not work either. Jon On 7/6/06, Tom Chiverton <[EMAIL PROTECTED]> wrote: > On Wednesday 05 July 2006 18:28, Jon Gunnip wrote: > > I've grep'd arround and I can't find it. We could implement our own > > try/catch with logging in all webservices, but I'm hoping that is not > > necessary. > > There is no other exception handler swallowing it (server setting, > Application.cfm/cfc) ? > > -- > Tom Chiverton > > > > This email is sent for and on behalf of Halliwells LLP. > > Halliwells LLP is a limited liability partnership registered in England and > Wales under registered number OC307980 whose registered office address is at > St James's Court Brown Street Manchester M2 2JF. A list of members is > available for inspection at the registered office. Any reference to a partner > in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by > the Law Society. > > CONFIDENTIALITY > > This email is intended only for the use of the addressee named above and may > be confidential or legally privileged. If you are not the addressee you must > not read it and must not use any information contained in nor copy it nor > inform any person other than Halliwells LLP or the addressee of its existence > or contents. If you have received this email in error please delete it and > notify Halliwells LLP IT Department on 0870 365 8008. > > For more information about Halliwells LLP visit www.halliwells.com. > > > ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:245568 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
OnSessionEnd() not called on server shutdown?
Hi, >From my testing, it appears that OnSessionEnd() in Application.cfc is not called when the CF server has its services restarted. Has anyone else run into this? Any suggestions for a workaround? Thanks, Jon ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:245425 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
Where do we webservice exceptions go?
Hi, We monitor our applications in the production environment by monitoring various coldfusion logs, like exception.log. When a remote client calls a webservice on our server and that webservice generates an exception, is that logged anywhere on our server? For example, I would hope this is logged somewhere: I've grep'd arround and I can't find it. We could implement our own try/catch with logging in all webservices, but I'm hoping that is not necessary. Thanks! Jon ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:245424 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: replacing special chars
Daniel, I found that chr(28) is not the actual code for left double quote copied from Word. It is the resulting code when we try to store the actual code, chr(8220), to our Oracle DB. To cover new and old data, we do a replacement on both. The full code we use is below. Hope that helps, Jon var Local = StructNew(); Local.Text = Arguments.Text; Local.Text = Replace(Local.Text, chr(11), " ", "all"); /* vertical tab */ Local.Text = Replace(Local.Text, chr(19), "-", "all"); /* short dash from MS Word after saved to DB */ Local.Text = Replace(Local.Text, chr(20), "--", "all"); /* long dash from MS Word after saved to DB */ Local.Text = Replace(Local.Text, chr(24), "'", "all"); /* left single quote from MS Word after saved to DB */ Local.Text = Replace(Local.Text, chr(25), "'", "all"); /* right single quote from MS Word after saved to DB */ Local.Text = Replace(Local.Text, chr(28), '"', "all"); /* left double quote from MS Word after saved to DB */ Local.Text = Replace(Local.Text, chr(29), '"', "all"); /* right double quote from MS Word after saved to DB */ Local.Text = Replace(Local.Text, chr(8211), "-", "all"); /* short dash from MS Word */ Local.Text = Replace(Local.Text, chr(8212), "--", "all"); /* long dash from MS Word */ Local.Text = Replace(Local.Text, chr(8216), "'", "all"); /* left single quote from MS Word */ Local.Text = Replace(Local.Text, chr(8217), "'", "all"); /* right single quote from MS Word */ Local.Text = Replace(Local.Text, chr(8220), '"', "all"); /* left double quote from MS Word */ Local.Text = Replace(Local.Text, chr(8221), '"', "all"); /* right double quote from MS Word */ return Local.Text; On 5/31/06, Daniel Kessler <[EMAIL PROTECTED]> wrote: > I am trying to clean up some text that is entered into a form. The > text usually comes from Word but also comes from other sources. I > usually get a box instead of the char in this situation. I'm using > an include that I pulled off of cflib and I'm trying to adjust it. > The code is basically: > function ConvertSpecialChars(textin) { > return ReplaceList(textin, "#chr(28)#,#chr(145)#,#chr(146)#,#chr(147) > #,#chr(148)#", "',',',#chr(34)#,#chr(34)#"); > } > > I added the chr(28) which seems to be the left side of a smart quote > from Word but this doesn't seem to be cleaning that out and replacing > it with a single quote (though now I realize it should be a double- > quote). Here's a test that I did that shows the bad char and it's > number using asc(the_letter). Even though it goes through this > cleaning, it still shows a the chr(28) char. In addition, though it > doesn't show the bad right quote, when I go into the form to edit it, > the invisible right quote is there and I can tell by moving the > insertion point over letter by letter where it pauses at that spot. > > Anyhoo, why doesn't it replace this char and is there a better way of > doing this? > > thanks and good morning (or whichever time you're at). > > > _ > > Daniel Kessler > > College of Health and Human Performance > University of Maryland > Suite 2387 Valley Drive > College Park, MD 20742-2611 > Phone: 301-405-2545 > http://hhp.umd.edu > > > > > ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:241854 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: CFMX7 and PDF Generation
This also happened to us once in over a year of generating PDF's using cfdocument. We traced it down to a PDF request. After that request, CPU shot up over 50% (it's usually around 10%) and stayed at that level. No PDF's could be generated until we restarted the CF services. Jon On 4/17/06, Denny Valliant <[EMAIL PROTECTED]> wrote: > On 4/16/06, Kay Smoljak <[EMAIL PROTECTED]> wrote: > > > > Funnily enough, after weeks of developing reports on our test server > > with no issues, I've had this happen twice this morning (CFMX7 and > > cfreport, with SQL Server not MySQL). Dunno what caused it though. > > > Memory I'd bet. Maybe try some forced garbage collection? Or Stick a > memory monitor app somewhere and watch it? > > Just guesses. Maybe increase the heap size for the JVM? > > More guesses. Dunno off hand... > > Force be with you, > :deN > > > ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238034 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: cfscript equivalent for cfthrow
Oleg, We have a set of user-defined functions that mimic CF functions not available in CFScript that we include in many of our applications. For example, we define throw(), throwType(), and rethrow(): Jon On 3/29/06, Oleg Gunkin <[EMAIL PROTECTED]> wrote: > What's the equivalent to cfthrow inside cfscript? > > try{ > ... > }catch(Any e){ > //Throw new exception > } > > -- > Oleg Gunkin > Email: [EMAIL PROTECTED] > Phone: (604) 666-9392 > Emerging Technologies / Pacific Web Services > Information Technology Services > Public Works and Government Services Canada (Pacific) > > ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:236613 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: XMLTransform() Question
Rob, I believe CF 7 uses xalan 2.5.1 to do its XSLT processing. The current version of xalan is 2.7.0 (http://xml.apache.org/xalan-j/) but it still only supports XSLT 1.0. There might be another XSLT transformer that supports 2.0 and that you could use in your CF app, but I'm not sure of which one (Saxon?) or the exact steps to get that working. XSLT 2.0 does appear to be much more developer friendly in several respects: http://www.xml.com/pub/a/2002/04/10/xslt2.html Jon On 3/30/06, Munson, Jacob <[EMAIL PROTECTED]> wrote: > > 1. Is XSLT 2.0 "official"? From W3C, it appears to be a > > recommendation, but I'm never sure how to read these things. > > I don't have an answer for your real question, but I'm pretty sure a W3C > recommendation is their official standard. They call it a > recommendation, because they can't force technology vendors (like > Microsoft) to follow their standard. But once a draft proposal has been > accepted by the W3C and the community, they release it as a > recommendation. > > > - > > > [INFO] -- Access Manager: > This transmission may contain information that is privileged, confidential > and/or exempt from disclosure under applicable law. If you are not the > intended recipient, you are hereby notified that any disclosure, copying, > distribution, or use of the information contained herein (including any > reliance thereon) is STRICTLY PROHIBITED. If you received this transmission > in error, please immediately contact the sender and destroy the material in > its entirety, whether in electronic or hard copy format. Thank you. A2 > > > > ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:236612 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: Turning on Metrics on CFMX7
Sung Woo, The logfile name is defined by {jrun.rootdir}/logs/{jrun.server.name}-event.log If you are running the Server edition, they should be in coldfusion-event.log, I believe. We change the attribute above to go to a different directory. Jon On 3/28/06, Sung Woo <[EMAIL PROTECTED]> wrote: > For some reason, I can't get metrics running on a recent CFMX7 upgrade (from > CFMX6.1). The relevant portions on jrun.xml are as follows: > > > >name="MetricsService"> > true > > > > > > > {server.date} {log.level} > {log.message}{log.exception} > > > true > true > true > false > > true > 120 > Web threads (busy/total): > {jrpp.busyTh}/{jrpp.totalTh} Sessions: {sessions} Total Memory={totalMemory} > Free={freeMemory} > name="ThreadedLogEventHandler"> >name=":service=ConsoleLogEventHandler" /> >name="FileLogEventHandler"> > name="filename">{jrun.rootdir}/logs/{jrun.server.name}-event.log > 200k > 3 > > > 5000 > false > > > > > Is there something I'm doing wrong? The log directory is > C:\CFusionMX7\runtime\logs, and I'm looking at coldfusion-out.log. > > ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:236479 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: Verity - cfsearch and cflock
Mike, Under some circumstances, I think a lock around cfsearch is still desirable. For example, if a user searches a collection while it is being updated via code, then they will get an error. For this reason, we use a readonly named lock (e.g. "AppASearchLock") around cfsearch and then an exclusive lock with the same name ("AppASearchLock") around for when we update the collection. Jon On 3/29/06, Mike Klostermeyer <[EMAIL PROTECTED]> wrote: > I understand from the documentation that it is "no longer best practice" in > CF7 to use cflock around cfsearch. Does this apply to CFMX a well? > > Mike Klostermeyer > [EMAIL PROTECTED] > > > > ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:236475 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
Anyone used XMLValidate() to validate XHTML?
We are storing some HTML in our database and I want to ensure it is valid to insert it into a in an XHTML document. 1) I've tried using XMLValidate(XHTMLText, urlToXHTMLDTD), but I get an error: 'recursive entity reference "%HTMLlat1". (Reference path: %HTMLlat1 -> %HTMLlat1 -> %HTMLlat1)'. 2) I've tried using XMLValidate(XHTMLText, "") which should use the DTD in the DocType in the XHTMLText source but this gives the error 'C:\CFusionMX7\runtime\bin\xhtml-lat1.ent (The system cannot find the file specified)'. 3) I've also tried XMLParse(XHTMLText), but this allows invalid entities like &iMadeThisUp; and invalid tags . XMLParse(XHTMLText, true, urlToXHTMLDTD) fails the same way as XMLValidate(XHTMLText, urlToXHTMLDTD) example above. Any ideas? I've pasted my IsXHTML() function below. Thanks, Jon var Local = StructNew(); Local.DocType = 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>'; Local.Text = Local.DocType & 'http://www.w3.org/1999/xhtml";>' & Arguments.Text & ''; Local.IsValid = false; try { Local.Results = XMLValidate(Local.Text, "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";); Local.IsValid = Local.Results.Status; } catch (Any e) {} return Local.IsValid; ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:234069 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: cfdocument how to use on a .cfm to print a form?
Caroline, I'm not exactly sure what you are asking. If you are asking "How do I include a form in my cfdocument?" the answer is that the form tag is not currently supported in cfdocument. When I've tried to use forms in cfdocument PDF's, I get some funky output. See http://livedocs.macromedia.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=ColdFusion_Documentation&file=1442.htm HTH, Jon On 2/15/06, Caroline Tobey <[EMAIL PROTECTED]> wrote: > I am new to using MX and need to add a button to a .cfm form that has > numerous input fields. The user will need to input and save their data > then click a button to print the completed form. How do I do this using > a button on the form that will say printerfreindly output then the > tag in my code? Any examplse would be wonderful thanks. > > > - > Yahoo! Mail > Use Photomail to share photos without annoying attachments. > > ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:232359 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: Monitoring JRun Memory Usage
Rick, We measure memory on our Windows 2000 server in two ways: 1) logging jrun metrics each minute though jrun.xml: Set metricsEnabled to "true" in jrun.xml and use the following metricsFormat to get a wealth of interesting statistics including total and free memory (works for CF7): Threads (total/busy/listen/idle): {totalTh}/{busyTh}/{listenTh}/{idleTh}; Sessions (active/inMem): {sessions}/{sessionsInMem}; Memory (total/free): {totalMemory}/{freeMemory}; Requests (handled/delay/dropped): {handledRq}/{delayRq}/{droppedRq}; Service (handledMS/delayMS): {handledMs}/{delayMs}; Bytes (in/out): {bytesIn}/{bytesOut} We then use a Windows scheduled task to run a small java parsing app that parses the coldfusion-event.log for high threshholds of memory, threads, or sessions. If threshholds are exceeded, we get an email with the details. 2) Windows performance montoring for CF-agnostic monitoring each minute: We use the Windows performance monitor to record JRUN, IIS, and server processor and memory usage to a CSV file each minute. This is useful for investigating a poorly running machine or retracing why the server crashed. Jon On 1/20/06, Rick Root <[EMAIL PROTECTED]> wrote: > I'm running CFMX7.0.1 Enterprise on Windows Server 2003. > > I'd like to monitor - and log - JRun memory usage. coldfusion died on > us this morning for some reason - I can't find any indication of what > caused the error other than the time it occurred (9:16am) when an > OutOfMemory error occurred. > > I thought it would be useful to monitor memory usage every minute or so > and record it to a log... timestamp,memory > > Anyone got any ideas of the simplest way to do this? I do have Perl > installed on the server so that might be an option. > > Rick > > ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:230125 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
cfcache doesn't lock for simultaneous requests?
I'm using cfcache for a page that takes 30 seconds to generate. This is the behavior I'm seeing: Time 0: request #1 comes in, generating page Time 15s: request #2, starts generating page Time 30s: request #1 finishes Time 45s: request #2 finishes I would think that the second request wouldn't try to generate the page and both requests should finish at time 30s. In our actual situation, we get 5 outside requests simultaneously trying to generate the page and since you get an addition cache generating web request for each outside request, we get 10 threads busy trying to generate the cache and this maxes out our server threads. Is this how cfcache is supposed to work? Any workarounds or other caching tags people would recommend where this behavior is not exhibited? Thanks, Jon ~| 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:218513 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: Sorting QofQ in ORDER BY
If you are on CF7, then you can use Cast() in the query of queries to convert a column to a specific type. For example, SELECT Cast(StringColumn as Integer) as NumberColumn FROM MyQuery You might not be able to due the order by in the same statement. You might need an additional query of queries to accomplish that. For more info, see http://livedocs.macromedia.com/ coldfusion/7/htmldocs/1271.htm Jon On 7/13/05, Lincoln Milner <[EMAIL PROTECTED]> wrote: > I've got a QofQ that I want to order on a character field. Only the > field contains only numbers (don't ask), and the user wants it sorted as > if they were numbers (1, 2, 3, ...) not strings (1, 10, 11, 2, 3, ...). > Simple enough in database (Oracle in this case) since you can just > TO_NUMBER() the value, but you apparently don't have that luxury in QofQ > (it doesn't like parentheses in the SQL statements. > > So anyone have any ideas on how I can do this? I'm running out of > options and "no can do" isn't sitting well with the user. > > Thanks! > > Lincoln T. Milner > Senior Applications Programmer/Analyst, Department of Health Evaluation > Sciences > > > Penn State College of Medicine Ph: 717.531.7178 x4521 > 600 Centerview Drive Fax: 717.531.5779 > Suite 2200, MC A210 [EMAIL PROTECTED] > Hershey, PA 17033-0855 > > *E-Mail Confidentiality Notice* > This message (including any attachments) contains information intended > for a specific individual(s) and purpose that may be privileged, > confidential or otherwise protected from disclosure pursuant to > applicable law. Any inappropriate use, distribution or copying of the > message is strictly prohibited and may subject you to criminal or civil > penalty. If you have received this transmission in error, please reply > to the sender indicating this error and delete the transmission from > your system immediately. > > > > > ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:211796 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: Any way to remove/rename "\cfusionmx\runtime\logs\*.log" files?
To control the runtime logs, update the attributes filename, rotationSize and rotationFiles in cfusion/runtime/servers/coldfusion/SERVER-INF/jrun.xml and restart the CF server. HTH, Jon On 7/7/05, Gaulin, Mark <[EMAIL PROTECTED]> wrote: > Hi > Is there any way to remove or rename "\cfusionmx\runtime\logs\*.log" > files, short of stopping the cfmx service, moving the files, and > starting it again? Can the files be created with dated file name, or be > configured to rotate somehow? > > I've got some pretty big files and it stinks now being able to > manipulate them when the site is up. > > Thanks > Mark > > ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:211344 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: CFMX XML/XSLT questions....
XSLT can be a little bit tricky to get your head around if you are new to it. For example, variables can only be set once within their scope and you often use recursion implicitly (apply-templates) or explicitly (call a template inside of itself) to get things done that you might you accomplish quickly in CF with some loops and variables. That said, XSLT is designed to transform XML documents into other documents, often HTML or XML. Thus, if you have XML to begin with, then I would definitely consider using XSLT to display it as HTML. It can do searching, grouping, and filtering. I find pulling lots of data with XMLSearch() in CF to be quite ugly and hard to maintain and probably not as fast as doing it with XSLT. Also, with CF 7, you can pass parameters to XMLParse(), so if you want to separate your data from your display logic, you can put your data in the XML and pass the display options to XMLParse() at runtime. If you are reusing the data with new display options (e.g. now sort ascending), then you can cache the XML and just reparse it with new display options. I don't find XSLT slow per se, but it easy to accidentally write slow performing XSLT code. The slowness usually comes from the XPath expressions in the XSLT (e.g. searching from the document root when you just need to search below the current node being processsed). Maybe you could do a brief mock up with XSLT to see if you are comfortable with it and if it is a good fit for you project. With the prevelance of XML, I think XSLT if a valuable technology for a web programmer to know. Hope that helps. Jon On 5/19/05, Joe Eugene <[EMAIL PROTECTED]> wrote: > If you dont really have a purpose for XSLT, dont use it. XSLT is slow. > Just the parse the xml file (xmlParse()) and use xPath expressions to pull > out whatever you need. > > If the xml data doesnt change that often, you could cache the parsed xml > doc. > > Joe Eugene > > - Original Message - > From: "Jeff Waris" <[EMAIL PROTECTED]> > To: "CF-Talk" > Sent: Thursday, May 19, 2005 11:54 AM > Subject: CFMX XML/XSLT questions > > > > What I am doing is not earth shattering by any means but I am looking for > > the most efficient way to do it. The XML is generated on the fly and about > > the only options I have is the date range I give to create the file. > > > > I would like to be able to sort, filter and display it back to the user > > based on the information in the XML file itself. Am I going in the right > > direction by using XSLT for doing this? OR... should I throw the data from > > the XML file in a temporary table in my SQL7 database? If I throw the > > information in the temp table I am then free to query the data and use CF > to > > parse out the data to the user.. What's the better way, or do I have more > > options for doing this kind of thing??? > > > > Thanks. > > Jeff > > > > > > > > ~| 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:207543 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: Preparing high quality forms for print
Chris, cfdocument does not currently support the form tag and its subelements. See http://livedocs.macromedia.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=ColdFusion_Documentation&file=1442.htm In my experience with cfdocument, the input boxes look OK, but the check boxes, radio buttons, and textareas have problems. Jon On 5/16/05, Christopher P. Maher <[EMAIL PROTECTED]> wrote: > I am trying to develop an insurance application and populate it with data > using ColdFusion. The application must be of "desktop publishing" standards > with appropriate control over lines, positioning of text, check boxes, > shading, varying font sizes. All components of the form should print in the > same position all the time. The application can be several pages long with > specific control over page breaks. Printing has to be consistent across > users, all of whom will be using IE. > > I have considered three CFMX 7 solutions: > > 1. Report Builder - can't figure out how to do more than one page or control > page breaks. Also no check box control that I could find. If I could make > several one page reports and combine them together, that would be fine. > > 2. Crystal Reports - I don't see anyway to incorporate CFML functions into > the report nor can a query be passed in. Since much of our data is stored in > a WDDX packet, I'm not sure how best to access it. I haven't spent a lot of > time with Crystal but I did like the approach of the Report Builder better. > > 3. CFDocument - coding the forms in HTML is cumbersome, even with > Dreamweaver. Aside from the amount of work to build the HTML, the main > problem is that row heights in tables will expand to allow content to be > displayed. > > I think all of these have some potential but offer definite challenges as > well. What I'm looking for is some advice as to which of these directions > would be the best to pursue or if there are other options which might > accomplish what I want more easily. I want to pick a solution and pursue it, > but also want to know that it really will work. I can't afford the time to > pursue the wrong path. > > Whatever the solution, it needs to be flexible for making changes in the > future. Since we have lots of these different documents to produce which all > have common features, something which allows objects to be reused would be a > definite plus. That has me leaning toward CFDocument but the client has a > strong bias against an HTML based solution, believing it to be inferior with > respect to quality of output. > > An example of a form I'm trying to create can be found at > http://www.modotech.com/sampleform.pdf > > Thanks. > > Chris > > > Christopher P. Maher, FCAS, MAAA > Modotech, Inc. > [EMAIL PROTECTED] > http://www.modotech.com > > ~| 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:206768 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: Tuning CFDOCUMENT PDF output quality?
I think there are probably quite a few bugs with CF's HTML -> PDF conversion regarding applying CSS properly. Our group has found some of the following css problems: 1) border-collapse: collapse does not work 2) specifying multiple classes does not work: e.g. should implement both classes but doesn't 3) text-indent with negative values does not work (used for "outdenting" the first line of a paragraph) We have submitted these bugs to http://www.macromedia.com/support/email/wishform/ along with simple test cases to demonstrate the bug. I hope other people do the same so that the PDF generation is more robust and predictable in a future updater. I'd be interested to hear what other problems people have found with the cfdocment PDF conversion. Jon On 5/11/05, Pete Ruckelshaus <[EMAIL PROTECTED]> wrote: > The first and most annoying problem is that the PDF isn't properly displaying > some CSS > attributes like border. ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:206572 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: J2EE Sessions, Sub-domains, and IE
Dave, Thanks for the suggestion, but I don't believe there are any domain attributes being set in the existing cookies. When I view the cookie in firefox, it show the host as "mysubdomain.site.com" for one cookie and "mysite.mysubdomain.site.com" for the other. I think I would see ".mysubdomain.site.com" in the cookie if it were a domain cookie. Thus, I don't think your suggestion will work unless I'm missing something. Unfortunately, our server is of lower profile than the mysubdomain.site.com, so it is unlikely that server name will change soon. We might be able to change ours, but I wouldn't do it just to get J2EE sessions back. Jon On 5/6/05, Dave Watts <[EMAIL PROTECTED]> wrote: > > Thanks for the pointer. Looks like I'm stuck with no J2EE session > > variables, changing the name the jsessionID is stored as, or changing > > my host name. > > Well, I'd recommend changing your host name if you can, simply because it's > a bit confusing to have a default host for a subdomain. However, as an > alternative, you might be able to rewrite the cookie yourself using the > CFCOOKIE tag and omitting the DOMAIN attribute so that it is only set for > the host that's creating the cookie. > > 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! > > ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:205933 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: J2EE Sessions, Sub-domains, and IE
Rob, Thanks for the pointer. Looks like I'm stuck with no J2EE session variables, changing the name the jsessionID is stored as, or changing my host name. Jon On 5/6/05, Rob <[EMAIL PROTECTED]> wrote: > http://www.robrohan.com/blog/index.cfm?mode=entry&entry=9B8F98DE-13C9-519C-6C958F2F38E1BACD > > On 5/6/05, Jon Gunnip <[EMAIL PROTECTED]> wrote: > > Hi, > > > > I have an issue with J2EE session and the incorrect session cookies > > being sent by IE. > > > > I manage a CF site with name like myhost.mysubdomain.site.com. There > > is another CF site named mysubdomain.site.com. We both have J2EE > > sessions enabled. > > > > In IE 6 (not Firefox), if a user browses first to mysubdomain.site.com > > to a page that generates a session, then they get a session cookie set > > with host domain.site.com. If they then, go to my site to a page that > > creates a session, they get a session cookie set with host > > myhost.mysubdomain.site.com. > > > > But, when I redirect them to another page on my site, IE sends back to > > the server the cookie for mysubdomain.site.com, not > > myhost.mysubdomain.site.com. The net results is that the user can > > never create a session on myhost.mysubdomain.site.com unless they > > don't first browse to mysubdomain.site.com. > > > > It seems like I can work around this by turning off J2EE sessions, but > > that is unfortunate, and I'm still not sure there aren't some security > > issues with the wrong cookies being sent. > > > > Any suggestions on how to make this work with J2EE sessions? I have > > tried about every possible permutation of settings > > with no luck. > > > > Thanks, > > Jon > > > > > > ~| 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:205920 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
J2EE Sessions, Sub-domains, and IE
Hi, I have an issue with J2EE session and the incorrect session cookies being sent by IE. I manage a CF site with name like myhost.mysubdomain.site.com. There is another CF site named mysubdomain.site.com. We both have J2EE sessions enabled. In IE 6 (not Firefox), if a user browses first to mysubdomain.site.com to a page that generates a session, then they get a session cookie set with host domain.site.com. If they then, go to my site to a page that creates a session, they get a session cookie set with host myhost.mysubdomain.site.com. But, when I redirect them to another page on my site, IE sends back to the server the cookie for mysubdomain.site.com, not myhost.mysubdomain.site.com. The net results is that the user can never create a session on myhost.mysubdomain.site.com unless they don't first browse to mysubdomain.site.com. It seems like I can work around this by turning off J2EE sessions, but that is unfortunate, and I'm still not sure there aren't some security issues with the wrong cookies being sent. Any suggestions on how to make this work with J2EE sessions? I have tried about every possible permutation of settings with no luck. Thanks, Jon ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:205887 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: cfgrid on cfmx7
Simon, Just to clarify, In IIS, 1) I have an IP restriction on /cfide so that it (and all its children) can only be viewed by localhost. 2) I override 1) for /cfide/scripts and /cfide/classes so that all web users can access those directories (and all their children) I hope that makes sense. Jon On 5/4/05, Simon Whittaker <[EMAIL PROTECTED]> wrote: > Jon, > > Thanks - I will give this a try tomorrow, I think it would make sense > to not require all those directories to be present in every site that > requires a cfgrid though? > > S > > On 04/05/05, Jon Gunnip <[EMAIL PROTECTED]> wrote: > > Simon, > > > > I have cfgrid working on CF7 with IIS. I have done an IP restriction > > to localhost for all directories except classes and scripts. Perhaps > > you need to open up the scripts directory too? > > > > Jon > > > > On 5/4/05, Simon Whittaker <[EMAIL PROTECTED]> wrote: > > > Hi There, > > > > > > I have come across something using cfgrid on a new install of cfmx7 > > > which I currently evaluating. I have performed a clean install of > > > cfmx7 on win2k server which resulted in a /cfide virtual directory > > > being created in IIS, in this directory were all the directories > > > normally associated (ie administrator etc). I firstly attempted to > > > create a cfide directory and then create a virtual directory called > > > classes pointing to the dir in c:inetpub but this resulted in no data > > > being passed from the form to the action page. I then attempted to > > > restrict access to every folder except classes using IP filtering but > > > again no data was submitted from the form. > > > > > > I do not want my cfadministrator dir available from anywhere except > > > localhost and would therefore see this as a bug - can anyone else > > > verify/advise me on this? > > > > > > Cheers > > > > > > Simon > > > > > > > > > > > > ~| 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:205626 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: cfgrid on cfmx7
Simon, I have cfgrid working on CF7 with IIS. I have done an IP restriction to localhost for all directories except classes and scripts. Perhaps you need to open up the scripts directory too? Jon On 5/4/05, Simon Whittaker <[EMAIL PROTECTED]> wrote: > Hi There, > > I have come across something using cfgrid on a new install of cfmx7 > which I currently evaluating. I have performed a clean install of > cfmx7 on win2k server which resulted in a /cfide virtual directory > being created in IIS, in this directory were all the directories > normally associated (ie administrator etc). I firstly attempted to > create a cfide directory and then create a virtual directory called > classes pointing to the dir in c:inetpub but this resulted in no data > being passed from the form to the action page. I then attempted to > restrict access to every folder except classes using IP filtering but > again no data was submitted from the form. > > I do not want my cfadministrator dir available from anywhere except > localhost and would therefore see this as a bug - can anyone else > verify/advise me on this? > > Cheers > > Simon > > ~| 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:205604 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: recoding some parts into Java...
One area where we found significant improvements by moving code from ColdFusion to Java is where we were creating up to thousands of objects in high iteration loops. We were modeling an element of lists with a component and then doing set operations (union, intersect, difference) on those lists. We modeled that simple component with a Java class instead and increased performance over 80% in just the object creation (that figure is off the top of my head - its been awhile since we tested the old way). Java's set operations (java.util.HashSet) accessed via cfscript also simplified the overall code. Basically, I would suggest that if you can isolate an area where is it taking CF (not the mail server, database call, etc...) a while to perform, especially something that is called in a loop, then you might want to try implementing that functionality in Java. For example, if it takes ColdFusion 10ms to create a component and Java takes 5ms to create a similar object, then you only get 5ms savings on one call. If that is being called in a loop 5000 times, then you get 25000ms = 25 seconds savings. Big difference. Jon On Apr 7, 2005 9:07 AM, Protoculture <[EMAIL PROTECTED]> wrote: > Would we get a substantial performance boost on a process intensive series of > CF tasks if we converted them into Java? ( assuming of course it was done > properly ). > > Right now we have a emailing system that takes quite a bit of time to finish. > I'm wondering if we brought the majority of processes into Java if that would > help us out. > ~| 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:201903 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: CSV file and com.Ostermiller.util.ExcelCSVParser
Victor, The docs at http://ostermiller.org/utils/doc/com/Ostermiller/util/ExcelCSVParser.html explicitly state that the parser should work as you expect: Empty fields are returned as as String of length zero: "". The following line has three empty fields and three non-empty fields in it. There is an empty field on each end, and one in the middle. One token is returned as a space. ,second,, ,fifth, A few things I might try if I were you: 1) try and reproduce the problem with as simple an example as possible (e.g. Parser.parse("a,,b") ) 2) write some simple java to try to reporoduce a simple example 3) if both of the above still reproduce the broblem, you could ask mr. ostermiller to fix the problem and maybe you can workaround it by using a regex on the empty string to add a "rare" string to empty cells prior to parsing and then remove it after parsing 4) if you can't reproduce the problem with a simple string, keep adding to it until it looks more like your CSV and fails. Good luck. Sorry I couldn't be of more help. I'd be interested to hear what you find. Jon On Apr 4, 2005 6:10 PM, Victor Moore <[EMAIL PROTECTED]> wrote: > Hi Jon, > I'm happy with this utility , except this little problem. > Bellow is the code: > > > parser = createObject("java", "com.Ostermiller.util.ExcelCSVParser") ; > fileInfo = parser.parse(fileContents) ; > noFields = arrayLen (fileInfo); > for (i = 2; i lte noFields; i = i + 1) > { > lineArray = fileInfo [i]; > initSize = arrayLen (lineArray); >if (initSize lt 30) > { > msg = "Error...; > } > } > > > I know that there are 30 fields in the file. If I open the file in > Excel I can see all of them there, but some of them have no value and > this is why the checking bombs. > If I run a replace all in excel and replace the empty fields with a > space everything is OK and the file parsing works as expected. > > ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:201816 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: CSV file and com.Ostermiller.util.ExcelCSVParser
Victor, I'm using the ostermiller CSVWriter, and I am very happy with it. I'm having trouble understanding exactly what your problem is. Can you share some relevant code? Jon On Apr 4, 2005 12:58 PM, Victor Moore <[EMAIL PROTECTED]> wrote: > Actually it's a little bit more complicated than this. > The com.Ostermiller.util.ExcelCSVParser utility returns a Java array > which is has a Vector type and not the coldfusion array type. > Unfortunately (and something that I cannot explain) some lines that > have empty fields are not pick up. > I need something to dynamically resize the java array (the java array > doesn't have a resize feature to force ) or cast it to a cf array > type. > > thanks > Victor > > > On Apr 4, 2005 10:36 AM, Kerry <[EMAIL PROTECTED]> wrote: > > this will probably be because CF ignores empty list elements. > > there might be some kind of a split function on cflib.org > > > > > > -Original Message- > > From: Victor Moore [mailto:[EMAIL PROTECTED] > > Sent: 04 April 2005 15:14 > > To: CF-Talk > > Subject: CSV file and com.Ostermiller.util.ExcelCSVParser > > > > I am using com.Ostermiller.util.ExcelCSVParser with great succes to > > parse csv files. There is only one small problem that I can't figure > > out.If there are any empty columns in the file they are not picked up > > and as a result the parsing process is failing. > > > > The work around is to open the file in excel and run a replace all > > (for empty string with a space). Unfortunately this is used by end > > users and for some reason they don't do it ... > > > > Is any way to do it programmatically? > > > > Thanks > > Victor > > > > > > ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:201450 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: CFLDAP timeout ignored/ force timeout with Java?
Thanks for the suggestions. I removed the cfldap timeout attribute and the hanging still occurs. I have a at the top of the page and yet the page hangs for more than 300 seconds. The test I am doing is to grab a bunch of names from our database and then enter a loop where I do a cfldap call for each individual (with a 1 second pause between each) to see if I can get their CN from the LDAP directory. It hangs on the most recent test after the 43rd individual - but that is arbitrary. On the next test, it might pass that individual with no problem and hang on the 50th or 100th individual. Any other suggestions? Jon On Wed, 9 Feb 2005 13:07:14 -0500, Douglas Knudsen <[EMAIL PROTECTED]> wrote: > I setup a CFC for authentication against an LDAP. In the cfm page it > is called I use works fine. > > Doug > > > On Wed, 9 Feb 2005 11:02:46 -0600, Dawson, Michael <[EMAIL PROTECTED]> wrote: > > Have you tried not using the timeout attribute? > > > > There are issues with CF not returning the correct results if you have a > > timeout specified and there are a large number (1000+) results being > > returned. > > > > M!ke > > > > -Original Message- > > From: Jon Gunnip [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, February 09, 2005 10:39 AM > > To: CF-Talk > > Subject: CFLDAP timeout ignored/ force timeout with Java? > > > > I'm using CFLDAP against a Novell directory service. Ocassionally, I am > > getting the thread hanging even though I have a timeout="60" set on my > > cfldap tag. (This is MX and Macromedia docs say that timeout is > > actually in milliseconds not seconds > > http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_19579, > > but it doesn't seem to work regardless). > > > > Is there a way that I can keep the thread from hanging? > > > > I was thinking about creating a Java thread before the cfldap call and > > having it sleep 60 seconds and then throw an exception. After the > > cfldap call, I would stop and kill the thread so that the exception > > would not be thrown if the cfldap call completed in time. > > > > Is this possible? Any pointers on how to accomplish this? > > > > Thanks, > > Jon > > > > > > ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:194000 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
CFLDAP timeout ignored/ force timeout with Java?
I'm using CFLDAP against a Novell directory service. Ocassionally, I am getting the thread hanging even though I have a timeout="60" set on my cfldap tag. (This is MX and Macromedia docs say that timeout is actually in milliseconds not seconds http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_19579, but it doesn't seem to work regardless). Is there a way that I can keep the thread from hanging? I was thinking about creating a Java thread before the cfldap call and having it sleep 60 seconds and then throw an exception. After the cfldap call, I would stop and kill the thread so that the exception would not be thrown if the cfldap call completed in time. Is this possible? Any pointers on how to accomplish this? Thanks, Jon ~| 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:193862 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: Validating CSV data
If using a Jar file on your CF server is an options, you might also want to take a look at the open-source Java libraries for CV Parsing and Writing at http://ostermiller.org/utils/CSV.html. The parse() function in CSVParser throws an IOException if there is an error parsing. I use the ExcelCSVPrinter to write Excel compatible CSV's that users can download. It is quite handy at taking care of many of the nuances of CSV, and the code to create the CSV is much cleaner than the equivalent CF code. Jon On Thu, 02 Dec 2004 20:38:34 -0400, Brant Winter <[EMAIL PROTECTED]> wrote: > That is how I have ended up doing it. > > I created a function to check each field in each row, and create an array of > structures. Each array element represents a row in the CSV, if there is an > error it populates the structure in the array element that corresponds to the > curren trow of the CSV file. Later I check for structures in the array that > are not empty and generate an error report for the failed rows, and suck the > rest into the DB. > > ~| Special thanks to the CF Community Suite Silver Sponsor - CFDynamics http://www.cfdynamics.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:186149 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
issues with blank username/password when creating datasource
Hey all, I don't like to specify a username or password for datasources when creating them in the CF administrator.. Anytime I pass through code using a with this setup, even when a rollback is not executed, I get the following message in my application.log: "Warning","jrpp-417","09/30/04","13:10:46",,"[Macromedia][Oracle JDBC Driver]A username was not specified and the driver was unable to establish a connection using integrated security." In one place, this warning is actually an exception when the is doing a rollback. Some sample code is below. Any ideas on how to get rid of these messages without specifying a username and password when creating the datasource? Thanks, Jon Local.AppManager.GetPropertyManager().GetProperty('Campaign.Manager').Create(Local.Bean.GetName(), Local.UserEmail); AnnounceEvent("Mapping.Success", Arguments.Event.GetArgs()); Local.Bean.SetMessage("Create failed: #CFCatch.Message# #CFCatch.Detail#"); AnnounceEvent("Mapping.Failure", Arguments.Event.GetArgs()); [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: Query of Queries functionality in Java?
Yes, I'm the one who posted that workaround. The page is now summarized at http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/using_r6.htm. It is the official QofQ b*tch page! I'm really sick of spending so much time searching for workarounds for QofQ that gets things working until you discover the next bug or come across a circumstance where a previous workaround doesn't work. My current issue is that QofQ is trimming whitespace off of the end of some of my text columns. That's why I'd like to see a more robust QofQ implementation in Java. The functionality is so useful I'm surprised I can't find it. Any ideas anyone? Jon >>> [EMAIL PROTECTED] 8/24/2004 7:37:41 PM >>> Yeah, the datatype thing is a drag. That one really bit me one day. Did you find some of the work-arounds listed in the Macromedia live docs? One stands out in my memory, in case you don't get anywhere with Java - create an empty table with one column of each data type you need in your database, and name them according to their types, say numeric, string, date, etc Then instead of using QueryNew(), create your query with a query to that empty table using Select string AS myStringColumn1, numeric AS myNumericColumn1, numeric AS my numericColumn2, etc FROM QofQTable The datatypes will be set and you can then populate it reliably. I thought it was a cool workaround and worth mentioning. JICIH ;-) Nando On Tue, 24 Aug 2004 17:24:58 -0600, Jon Gunnip <[EMAIL PROTECTED]> wrote: > Is there a public package that supports query of queries-like > functionality in Java? I would assume it would be something like making > a SQL-like query against a Java ResultSet in memory. > > I keep coming across QofQ bugs. I would like QofQ functionality > without all of the bugs (not allowing control over column data types, > trimming text fields, ...). > > Thanks, > Jon > > [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Query of Queries functionality in Java?
Is there a public package that supports query of queries-like functionality in Java? I would assume it would be something like making a SQL-like query against a Java ResultSet in memory. I keep coming across QofQ bugs. I would like QofQ functionality without all of the bugs (not allowing control over column data types, trimming text fields, ...). Thanks, Jon [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: Book Review [ Java for Coldfusion Developers ]
Here is a review I wrote for the Salt Lake CFUG (http://www.slcfug.org/index.cfm?pageID=59): Jon "Java for ColdFusion Developers" is great overview of the Java Programming Language for web developers who already know ColdFusion and know little or no Java. The book is written for ColdFusion programmers who want to learn Java. It is not about how to use Java with ColdFusion. The book covers all of the basics of the Java programming language. By reading this book, you are ready to start doing some mid-level Java programming. You can also take your place in Java conversations you here in your office or on email lists. What is a servlet? What is a bean? What is strict typing? This book covers these basic ideas. The book focuses on 3 major parts. The first part, about 300 pages, is the Java language itself: typing, looping constructs, types of classes, locking, collections, etc. This is a very well-written overview. The second part, about 200 pages, consists of how Java is used, especially from the perspective of the web developer. You learn about servlets, JDBC, beans, JSP's, etc. This part is also well-written, but you start to find a lot of typos as you get nearer to the end of this part. This is not a major problem - the book could have used a little more proofreading. Finally, the last 90 pages of the book is a complete example of a simple bookstore sales application. What I like about this book is that it gave a pretty complete overview of the Java application from the perspective of someone who would use Java to do web development. The author is great, mixing concepts and examples very well. For such a complex topic, I like how the author jumps into the material without overexplaining everything - (e.g. like a "Dummies" book). Since CF'ers are not know for the OO-mindset, this pleasantly surprised me. The topics I was interested in were mostly covered, expecially servlets and JSP's. This will help me understand how ColdFusion works as a Java Application. I would like to have seen much more detail about how to start using Java with ColdFusion. The 200 pages devoted to IDE's, applets, Swing GUI's, and the example bookstore application could have been removed, I feel, and been replaced with more useful information about how ColdFusion developers could start using Java now. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
XML/XSLT to write typical CF Form page[ENCRYPTED]
I have an app with 100 forms that are all very similar in structure: 1) filter on some heirarchy of properies on the left: e.g. Year -> State -> City to find a paricular record 2) edit, delete, or add a new record on the right I want to streamline the maintenance of writing these CF self-posting form processing pages since the structure seems pretty consistent but each form is between 400 and 1000 lines of CF/HTML. I was thinking I could describe the structure in XML and then use XSLT to write my 400-1000 line CFM page. Then I could cfinclude the result. It would be great is someone out there has already defined a nice DTD for doing this. Anyone doing anything like this? Jon [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: XML/XSLT to write typical CF Form page
Sam, I've seen the Blackstone demo, and that is pretty unrelated to what I'm trying to do. Blackstone will take a small subset of CFML and create XML which can then be processed with a stylesheet to create an HTML layout. I want to write some XML and apply a stylesheet to create CFML. Basically, is it a good idea for similar processes (like similar-looking self-posting forms) to be described ONLY in XML and then converted to CFML so that one only has to write the similar CFML logic (that is reused in several pages) just once in an XSLT stylesheet? Jon >>> [EMAIL PROTECTED] 7/15/2004 1:06:13 PM >>> Blackstone does this. You write simple CFFORM/CFINPUT tags and behind the scenes it generates XForms (XML standard). Then it uses an XSLT to transform into HTML. You can use provided XSLT's or make your own. -----Original Message- From: Jon Gunnip [mailto:[EMAIL PROTECTED] Sent: Thursday, July 15, 2004 9:34 AM To: CF-Talk Subject: XML/XSLT to write typical CF Form page I have an app with 100 forms that are all very similar in structure: 1) filter on some heirarchy of properies on the left: e.g. Year -> State -> City to find a paricular record 2) edit, delete, or add a new record on the right I want to streamline the maintenance of writing these CF self-posting form processing pages since the structure seems pretty consistent but each form is between 400 and 1000 lines of CF/HTML. I was thinking I could describe the structure in XML and then use XSLT to write my 400-1000 line CFM page. Then I could cfinclude the result. It would be great is someone out there has already defined a nice DTD for doing this. Anyone doing anything like this? Jon [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: XML/XSLT to write typical CF Form page
Rob, Could you explain why you are creating an XSD from XML? I thought XSD's were for validation (like a DTD, but more powerful). Are you using the XSD to validate a form submission? I would like to use XML/XSLT as a .cfm page builder. The XSLT will write my cfquery's, cfif's, and forms. Is that what you are doing, too? I guess another option is to use cfm to build an XML doc that describes the "state" of the request (Filter, Save, Delete, ..) and the data in the form and use XSLT just to do the form display. The tricky part is that I want the same XSLT to work for lots of different forms, and I'm not sure if all of the possibilities of the different forms would make an XML doc that is way more complex than my current problem. Jon >>> [EMAIL PROTECTED] 7/15/2004 9:11:54 AM >>> Yeah, I am working on a project that does that. Actually it takes and XML document makes an XSD out of it then uses the XSD+XSLT to make form elements so what you are saying it totally possible. Cheers, Rob -- ~The cfml plug-in for eclipse~ http://cfeclipse.tigris.org ~open source xslt IDE~ http://treebeard.sourceforge.net ~open source XML database~ http://ashpool.sourceforge.net [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
XML/XSLT to write typical CF Form page
I have an app with 100 forms that are all very similar in structure: 1) filter on some heirarchy of properies on the left: e.g. Year -> State -> City to find a paricular record 2) edit, delete, or add a new record on the right I want to streamline the maintenance of writing these CF self-posting form processing pages since the structure seems pretty consistent but each form is between 400 and 1000 lines of CF/HTML. I was thinking I could describe the structure in XML and then use XSLT to write my 400-1000 line CFM page. Then I could cfinclude the result. It would be great is someone out there has already defined a nice DTD for doing this. Anyone doing anything like this? Jon [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: Macromedia JDBC driver class names
I tested the JDBC batch submit versus using looping over CFQuery and the results were about the same: 9 seconds to insert 2000 rows into a 2-column table. So, in my testing, it appears that the JDBC batch submit is no faster. I was surprised. I was hoping it would be a lot faster to do the JDBC batch since the following 'SQL Hack' that sends the data as one large insert takes less than 1 second (thanks to someone on the CFCDev list for this suggestion): INSERT INTO JONTEST (ID, Age) SELECT , FROM DUAL UNION ALL Unfortunately, I know of no similar hack for doing random UPDATE's. Jon >>> [EMAIL PROTECTED] 5/19/2004 4:28:38 AM >>> On Tuesday 18 May 2004 19:11 pm, Jon Gunnip wrote: > PreparedStatement stmt = conn.prepareStatement( "INSERT INTO Users > VALUES(?,?)"); > User[ ] users = ...; > for(int i=0; i > stmt.setInt(1, users[i].getName()); > stmt.setInt(2, users[i].getAge()); > stmt.addBatch( ); > } >>I don't see that being better than a cfloop'ed cfqueryparam'ed cfquery inside >>a cftransaction block. >>We don't see any scale issues with Oracle here - what have you seen ? [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: Macromedia JDBC driver class names
This is really helpful! I will use something like this in order to send multiple statements (like 1000 inserts, updates, or deletes) to the database. Since I am using Oracle, I cannot put multiple SQL statements inside of a CFQUERY. Looping over CFQUERY does not scale well for many statements. It would be great to be able to get a DB connection from the CF Server, but even without that, I think it is preferable to use the Java below in order to run many SQL statements in one call to the database using something like: PreparedStatement stmt = conn.prepareStatement( "INSERT INTO Users VALUES(?,?)"); User[ ] users = ...; for(int i=0; i stmt.setInt(1, users[i].getName()); stmt.setInt(2, users[i].getAge()); stmt.addBatch( ); } int[ ] counts = stmt.executeBatch();for (insertStatement in InsertStatements) Jon >>> [EMAIL PROTECTED] 5/18/2004 10:30:56 AM >>> Thanks for everyone's help.. with a little help from the datadirect documentation, I was actually able to get the following to work: clazz = CreateObject("java", "java.lang.Class"); // replace the package/class name of your db driver clazz.forName("macromedia.jdbc.MacromediaDriver"); driverManager = CreateObject("java", "java.sql.DriverManager"); // replace w/ your server, database name, username & password conurl = "jdbc:macromedia:oracle://:1521;SID=*;user=*;password=*"; connection = driverManager.getConnection(conurl); query = "DELETE FROM IDS WHERE ID=1"; preparedStatement = connection.prepareStatement(query); result = preparedStatement.executeUpdate(); WriteOutput("result = " & result); connection.close(); For what it's worth, this is the second time I've resorted to using the datadirect documentation to solve a driver-related issue with Cold Fusion :) - Rick [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Web application testing
>>> [EMAIL PROTECTED] 03/23/04 8:50 PM >>> I generally test my workflow by creating a non-functional html prototype then applying Interaction Design techniques (ala Cooper.com). It's a manual process though, requires a lot of thinking. What are you trying to achieve by testing the User Interface? Usually when I push a new version of a web application, I go through and access about 25% of the web functionality through the browser to make sure that everything is OK. Currently, I use a Unit testing framework to test the backend so I am usually aware of problems in the Model layer of my application. I would similarly like to automate my checking of the View layer (the browser interface to the Model) to make sure the View is interacting appropriately with the Model layer. I would still do some visual checking, but I think an automation tool would give more coverage and save a lot of time (just at the Unit testing does for the Model layer). I've been playing around with Canoo WebTest and it is very handy! You can build up your tests in reusable chunks, all defined in XML using Ant syntax. Jon -Original Message- From: Jon Gunnip [mailto:[EMAIL PROTECTED] Sent: Friday, March 19, 2004 1:57 PM To: CF-Talk Subject: Web application testing >> I've started using Canoo WebTest http://webtest.canoo.com which is an extension of JUnit. It's for testing at the web application level rather than unit testing. You >> would do this in addition to unit testing but you can do things like define test scenarios to submit a form for user registration I'd love to have some easy XML-based User Interface testing the workflow of a web application (e.g. SignOn -> Browse To Products -> Purchase Product -> Cancel Purchase). Does anyone else have any comments on good Web Application UI workflow testing? I've found the following four apps by looking at http://www.opensourcetesting.org/functional.php . Most of them are XML-based. Is there a best-of-breed solution in this area? Canoo: http://webtest.canoo.com/webtest/manual/WebTestHome.html XML Test Suite: http://xmltestsuite.sourceforge.net Latka: http://jakarta.apache.org/commons/latka/index.html Anteater: http://aft.sourceforge.net/index.html Thanks, Jon [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Web application testing
>> I've started using Canoo WebTest http://webtest.canoo.com which is an extension of JUnit. It's for testing at the web application level rather than unit testing. You >> would do this in addition to unit testing but you can do things like define test scenarios to submit a form for user registration I'd love to have some easy XML-based User Interface testing the workflow of a web application (e.g. SignOn -> Browse To Products -> Purchase Product -> Cancel Purchase). Does anyone else have any comments on good Web Application UI workflow testing? I've found the following four apps by looking at http://www.opensourcetesting.org/functional.php . Most of them are XML-based. Is there a best-of-breed solution in this area? Canoo: http://webtest.canoo.com/webtest/manual/WebTestHome.html XML Test Suite: http://xmltestsuite.sourceforge.net Latka: http://jakarta.apache.org/commons/latka/index.html Anteater: http://aft.sourceforge.net/index.html Thanks, Jon [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: JUnit with Cold Fusion
I've also made some modifications to CFUnit. It works great for testing my Model layer which is written in CFC's. I've got about 40 Tests running about 10 test functions each. It is nice to open a web page and see whether the recent changes you made have broken your Model! I added support for TestSuites to include other TestSuites as well as individual Tests. I also added some GetTickCount()'s to report the execution time that each test function (as well as Test/TestSuite execution times). I would love to share my code, but because it is *highly* based on code from the code in the DRK03 (which we purchased), I'm not sure if I am prohibited from sharing my code. Does anyone know? By the way, the Mach-II/JUnit implementation for CFC's sounds great! One complaint about cfunit is that the way it is written makes it difficult to configure (and extend) the display of test results. Hence, the display code I've added on is a tad messy. I would like to see an elegant implementation that allows one to easily configure and extend the display of test results. Jon >CFUnit is really handy and works similarly to JUnit. I have been using >it for a while now although I did added some additional assertions for >Query, Structure, Array and Component comparisons. > >Qasim > >-Original Message- >From: Chris Jensen [mailto:[EMAIL PROTECTED] >Sent: Thursday, March 18, 2004 9:31 PM >To: CF-Talk >Subject: JUnit with Cold Fusion > > >Hi, >I've been looking into getting into better testing practices with cold >fusion development. >I was looking into tools to support this, and while not actually a cold >fusion tool - JUnit (and some supporting projects for it) seems to be >the best option by far, so I was thinking of trying to get it working in > >CFMX. > >Has anyone else tried this and found any pitfalls? >Or, does anyone know of some good native Cold Fusion tools that can >provide the same thing? > >-- > _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: CF & XML??
Looks to me like you should replace x.DateReceived = x.DateReceived & REReplaceNoCase(x.xml, "^.*(.*?).*$","\1"); with x.DateReceived = x.DateReceived & " " & REReplaceNoCase(x.xml, "^.*(.*?).*$","\1"); Notice the addition of the " " separator. Jon >>> [EMAIL PROTECTED] 03/10/04 04:52PM >>> Hi guys, I have 3 lines of code which I really don't know what they do (I only have them because they interface with a mobile provider, they translate the XML to CF): x.DateReceived = REReplaceNoCase(x.xml, "^.*(.*?).*$","\1");if(x.DateReceived eq xml_in){x.DateReceived = "";}; x.DateReceived = DateFormat(x.DateReceived, "-mm-dd"); x.DateReceived = x.DateReceived & REReplaceNoCase(x.xml, "^.*(.*?).*$","\1");if(x.DateReceived eq xml_in){x.Datereceived = "";}; But I do know that when I insert x.DateReceived into my database it comes out as 2004-03-0911:24:15 which confuses my database. Obviously there should be some sort of separator between the date and the time but I don't know how to fix those lines of code. Can anyone help as it's over my head? Cheers, Stuart [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: Writing Files without CFFILE
>> And that seems to be gobbling as much RAM as before. In any event, as >> you said, it's working great when I bypass the CFC so no sense beating >> it to death. Do you have debugging on by any chance? That can really slow down a CFC-intensive request. Jon >>> [EMAIL PROTECTED] 03/09/04 11:29AM >>> On Mar 9, 2004, at 12:38 PM, Craig Dudley wrote: > I can only assume you were getting 14000 instances of the cfc object, > not sure why. You could try creating one instance and storing it in > say, > the Application scope, and use that, might help. But since it's > working > now anyway, might be a waste of time. I definitely was only instantiating the object once, prior to the looping. I was calling the method however, using this syntax: Not sure if that would be the problem. I a testing right now using: And that seems to be gobbling as much RAM as before. In any event, as you said, it's working great when I bypass the CFC so no sense beating it to death. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
passing parameters at time of cfc object creation
Hello, Is there a way to pass arguments at the time of cfc object creation? All of the methods in my CFC require a particular parameter, say 'ID' that I would like to pass in at the time of object creation ('this.ID = ') and then all of the methods will know that 'this.ID' and can refer to it. Otherwise, it seems like I have to have an 'Init' method in my CFC which sets the 'this.ID' variable and sets a 'this.IsInitialized' variable for the object. Then, all object functions will have to check 'this.Initialized' at the top of their function. If it is not there, they will have to do a . My current process means two things that I don't want to do: 1) create the cfc object and then initialize it 2) check in each cfc function to ensure that the initialization occurred I would like to: 1) pass in initialization parameters at the time of object creation, whereby all objects will automatically be initialzed and each function will not have to check for initialization. I didn't see any solutions in the documentation or on the web. Thanks! Jon Gunnip ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Protecting scope of variables
Hello, I am writing UDF's on MX using , and I would like to know what the best way to create local variables for use inside my functions that will not interfere with variables in the caller's scope. Right now, I have to make sure that my variable names are unique inside and outside function definitions. This is quite burdensome, making it difficult to easily name variables inside of functions to ensure I am not overwriting variables in the callers scope. It is also difficult for people to use my functions, since beside knowing my function name, its arguments, and what it returns, they must also know what variables I am using for internal function processing to ensure that their variables are not overwritten. Here is a basic example: I looked in the MM documentation, but I could not find an appropriate answer to this question. Thanks! Jon ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4