January 25, 2007
My favorite Firefox Extensions
I've compiled a list of my some of my current favorite extensions for Firefox.
- Flashblock - Just about everyone already knows about this. I think it was the first Firefox extension I ever installed.
- Web Developer - If you are in the business this is a must have. It makes it easy to edit CSS and instantly see the changes. Also allows you to disable the cache, view just about everything that's not normally visible on a page (e.g. element class and id names), and has quick access buttons to common functions like "View Source."
- Colorful Tabs - Changes the tabs' colors. Makes them stand out a little.
- Live HTTP Headers - Lets you view the HTTP Request and Response headers for a page. Optionally loads in the sidebar so you can watch them in real time.
- Session Manager - Saves you tabs, current pages, and browsing history when you exit. The next time you start everything goes back to the way you left it.
I have more, but those are the ones I use most often.
Character Sets
It is sometimes easy to forget the importance of character sets when developing web applications. I would venture to guess that many developers don't know how to handle issues such as BiDi text or correctly handle multi-byte characters. I have spent a considerable portion of the last month experimenting with sending Unicode characters to a web browser and I have discovered a few hints and "gotcha's" that I would like to pass along.
- PHP is pretty much multi-byte handicapped. Period.
- In Java servlets (and I suppose JSPs) add the preferred character encoding to the Content-type header before getting the PrintWriter from the response. This will set the encoding of the Writer to the charset in the Content-type header. I was doing unnecessarily wrapping OutputStreamWriters around the HttpServletResponse's OutputStream to accomplish this manually. It's so much nicer (and cleaner) to have the underlying implementation do this for you.
- Since ColdFusion runs in Java, it too automatically determines the character set and encoding to use from the Content-type header if you specify one. To do this use the <cfcontent> tag like this
<cfcontent type="text/html; charset=utf-8">. - Here's the gotcha with ColdFusion (and JSP perhaps, I haven't tried it): Templates are read using the platform's default character set, Windows-1252 on English Windows systems. The characters are stored internally as UCS-2 (it's Java after all), and encoded using your specified character set before being sent to the output buffer. This can be overridden with the <cfprocessingdirective> tag.
January 16, 2007
Web Site Theme
I've always been first to admit that I'm handicapped in the visual design area. I've been trying to redesign my web site for a couple of years and each time I get started I get frustrated and give up. I've finally resigned myself to using a canned design from Open Source Templates.
At the same time I'm cleaning up some orphaned files and updating the .htaccess files with redirects that work. I guess I've neglected my web site long enough.
January 1, 2007
Stored Procedures in ColdFusion and MySQL
I started using stored procedures in MySQL from ColdFusion.
I began receiving a NullPointerException when calling the stored procedure with the <cfstoredproc> tag. After checking the syntax I consulted Google for a hint. I found the MySQL JDBC driver that is included with ColdFusion is an older version that does not support calling stored procedures. I downloaded version 5 of MySQL Connector/J and copied the JAR to the shared library directory in my Tomcat installation and restarted.
I then created an "other" datasource in ColdFusion Administrator. I specified "com.mysql.jdbc.Driver" as the Driver Class. Stored procedures now work.

