Blog

Category Filtering: 'CF'

Remove Filter


Java Servlet Filters Part 2: Removing Cookies

Posted by Brad Wood
Jul 12, 2008 02:50:00 UTC
As promised, I have written a Java Servlet Filter to remove cookies from a request. If you don't know what a Servlet Filter is, read this blog. Let me start by saying while my filter does function like I wanted it to, it did NOT solve this problem. I'll blog on that next. UPDATE: Here are my findings Given that, I can't really think of a real-world use for this code, but I am always in favor of coding for the sake of learning.

I've created my first Java Servlet Filter!

Posted by Brad Wood
Jul 10, 2008 05:35:00 UTC
In the Java world, web requests are handled by servlets loaded within a servlet container. There is a servlet mapping which specifies a servlet class conforming to Sun's Servlet specification which has been part of the J2EE spec since version 2.2. When a request is sent to the servlet container, it is matched to the proper url pattern and passed to the appropriate servlet object via that objects service() method.

When life gives you lemons... (Ray's Friday Puzzler)

Posted by Brad Wood
Jul 08, 2008 18:17:00 UTC
If you haven't seen it yet, Ray Camden is back at it again with a new Friday puzzler. This one involves creating a UDF to mimic a lemonade stand. Your code has to programmatically decide how many cups of lemonade to make and how much to sell them for based on your budget, the weather, temperature, and your cost.

Ask and you will (hopefully) receive

Posted by Brad Wood
Jul 08, 2008 05:17:00 UTC
Do you know the address of the Adobe page for requesting bug fixes and product enhancements? Yes, that magical gateway of mystery and wonder that rhymes with a popular children's game. http://www.adobe.com/go/wish/

Hi, I'm ColdFusion, and so am I. (Is CF Schizophrenic?)

Posted by Brad Wood
Jul 05, 2008 23:18:00 UTC
Sometimes I wonder about ColdFusion. Mostly when it gets depressed and locks itself in the bathroom with a box of chocolates. Seriously though, the identity of CF can sometimes be illusive when you listen to what everybody wants all at once. ColdFusion is different than most languages and I think that's a good thing, but what pushes us to request the changes we want? Do we wish CF was easier to pick up for the beginner? Perhaps we want it to behave a bit more like our favorite scripting language for our benefit or to impress our friends.

I think we have an anemic Domain Model

Posted by Brad Wood
Jul 02, 2008 16:45:00 UTC
I have been pouring over the latest Fusion Authority Quarterly Update, and particularly liked Sean Cornfield's article "Beans and DAOs and Gateways, Oh My!" I am pretty familiar with the four application layers he describes, but have had difficulty at times reconciling all the diverse ways I see those implemented. (design patterns) I feel I have a good grasp on OOP, but most of my current application is still on a version of Fusebox 4 which was modified to the point of not being easily upgradeable. We have tried to do new development in MachII, but my exposure has been modest.

Check out Adobe's Max page with cool Flash games

Posted by Brad Wood
Jul 01, 2008 01:42:00 UTC
If you haven't seen it yet, Adobe announced their "official MAX NA Experience website" last week. It has session, speakers and event details. Ben Forta himself is in a humorous little video for which I have provided a quick screen shot of here.

Coding is JUST like carpentry

Posted by Brad Wood
Jun 29, 2008 01:45:00 UTC
Coding is JUST like carpentry, except with keyboards and mice instead of hammers and saws. Ok, ok, that analogy breaks down pretty quickly, but the thought did occur to me today. Let me explain. During the summer months my church spends the summer doing service projects like picking up trash and painting houses. With our recent tenant finish snugly under our belt we ventured out into the construction field to flex our power drills and sawzalls and help a smaller church in need.

Fun with java.net.URL

Posted by Brad Wood
Jun 28, 2008 03:17:00 UTC
I was working with URLs last week while working on my Is It Flex utility and I was looking for a handy way to take a base URL and a path/file relative to that URL and come up with a fully qualified combination. For instance, let's say you have the page http://www.mysite.com/pages/about.html and that page contains a relative reference to an image like this: The fully qualified path to the image would be "http://www.mysite.com/pages/my_photo.jpg". Ok, but given those first two pieces of information how do I consistently come up with the full path while taking into account any number of subdirectories, possible non-standard ports, and query strings with goodness knows what in them. My example at the time didn't have all those factors, but I figure any problem worth solving is worth solving well.

CFHTTP doesn't resolve URL's properly on redirect

Posted by Brad Wood
Jun 27, 2008 15:52:00 UTC
So I was working with CFHTTP the other day and noticed a strange behavior. There are two attributes I want to focus on: resolveurl and redirect. When setting redirect equal to true, ColdFusion will follow up to four 30x redirects (if a location header is provided) the most common being 302 (moved temporarily) and 301 (moved permanently). Redirects actually happen more often than you probably think. Did you know every time you type in a URL like "www.server.com/folder" your browser has to make two requests to get the page. There might be a file called "folder", but if there isn't, a 302 comes back and says check out "www.server.com/folder/" (with the trailing slash). A very common example of the 301 redirect is when you type in "yahoo.com". The server comes back and says try "www.yahoo.com".

Site Updates

Entries Search