Site Network: Personal | Professional | Photography

Technical Blog

This blog will contain content related to Java, Seam, Security, my sites and projects, as well as other technical subjects I am interested in.

Comments and questions are welcome!

10MinuteMail upgraded again

Saturday, November 3rd, 2007

Moved up to Seam 2.0 CR3, and JBoss 4.2.2. I also optimized some code, got rid of some useless error logging, etc...

Hopefully it will perform a little better:) So far it seems to process incoming e-mail much faster, which was a bottleneck under load.

Enjoy!

Top Ten Tools

Saturday, October 6th, 2007

I was surfing around today, and saw this article about the top ten tools you use.

As far as getting work done on the computer (I'm taking the computer for granted and not counting it as a tool, although for it all to come together it's worth noting I use an Apple MacBookPro with 4GB of RAM) my top applications are:

  1. Eclipse: my favorite Java IDE with a good set of plugins (JBoss Tools, MyEclipseIDE, WTP, Mylyn, and others)
  2. iGTD:  a great GTD task manager for the Mac.  I use it for work, personal projects, home errands, etc...  I used to use KinklessGTD in OmniOutliner, but now I swear by iGTD.  The upcoming Omni Focus will have to bring something amazing to the table to get to me to pay to switch.
  3. SSH/SCP/Terminal: I manage and deploy to many servers.  Being able to SSH into them and move files securely is critical.  I'm handy with the command line, bash scripting, and all that, so I end up doing things that way often.
  4. Emacs: I can handle vi, but when I'm on a remote server making changes or looking through files trying to figure something out, Emacs is my favorite tool for the job.
  5. Safari: I spend a lot of time on the web researching, reading, and looking at the applications I'm building.  I also use Camino, but Safari 3 is my favorite browser and is always open.
  6. Adium: I love staying in touch with my friends, family, and co-workers.  Adium lets me keep in touch on AIM, Yahoo, MSN, GTalk, and more in a very nice application.
  7. iTunes: Music helps me get into the zone and keeps me happy.  Plus I like to watch the occasional TV show:)
  8. Pages: as an architect I often have to generate documentation around projects.  I also write letters (yes the non-e-mail kind).  Pages is a great word processor and making professional looking easy to read documents is a snap.
  9. JBoss: JBoss is a fantastic application server.  It's free, open source, fast, and powerful.
  10. Postgres: Postgres is a database with all the great attributes I listed for JBoss.  I used to use MySQL but at the time I switched it was lacking many critical features (sub-selects, foreign keys, etc..).  After using postgres for a while, I haven't looked back.

Those are the applications that I have running on my laptop basically 24/7 and I use each of them every single day.

What are yours?  I'm not trying to get into an emacs versus vi flamewar, but I'd like to hear about what applications get you through your day a little easier.

JBoss Tools Properties Editor Surprise

Sunday, August 19th, 2007

No, not the kind of surprise with cake.

The latest JBoss Tools Eclipse plugin, which if like me you are running on a platform that they haven't released RedHat Developer Studio for is a pretty good option, which can be installed through Eclipse using this update URL:

http://download.jboss.org/jbosstools/updates/development

Sets up your default editor of .properties files to be the new Red Hat Properties Editor. It looks very snazzy. However, at least on my machine (Eclipse 3.3, JDK 1.5, OS X 10.4.10), whenever it opens a properties file, it happily strips out all of the equals signs separating property names from their values. They still look good in the graphical portion of the Red Hat Editor, but of course don't work very well anywhere else.

You can fix this by going into the Eclipse Preferences, General, Editors, File Associations, scrolling down until you see the "*.properties" entry and choosing the "Properties File Editor" as your default.

Firefox, xhtml, JBoss 4.2.0, JSF, and Google Ads

Sunday, June 10th, 2007

I upgraded the JBoss instance on my server just over a week ago from 4.0.5 to 4.2.0. Two things happened after that: Firstly, my google adsense revenue dropped by half, secondly I was contacted by two different people who were having some e-mails show a big error in Firefox, instead of showing up correctly. I don't use Firefox myself, I use Safari about 98% of the time and Camino when I find a site that doesn't render correctly in Safari. Today I discovered, while working on a new ad layout, that in Firefox the Google ads weren't rendering at all, throwing this error in the Firefox error console:

Error: uncaught exception: [Exception... "Object cannot be created in this context" code: "9" nsresult: "0x80530009 (NS_ERROR_DOM_NOT_SUPPORTED_ERR)" location: "http://pagead2.googlesyndication.com/pagead/show_ads.js Line: 4"]

Basically iframes can't be programatically inserted into strict xhtml elements. I did some googling and discovered that there were some discussions around this, but most of them simply said "either ditch google ads, or use text/html instead." But I WAS using text/html, both in the meta content tag in the pages, and then later (while working on this issue) in the JBossWeb web.xml mime type configuration for xhtml, just in case. Using wget with --save-headers didn't show anything unexpected. However, Firefox kept getting the response header saying the page was application/xhtml+xml which caused it to perform very strict validation, both breaking the google ads, and not letting sloppy tags or duplicated tags into the page, which are inherently going to happen when you're rendering html e-mail within a page.

The cause of the break was not moving to JBossWeb in 4.2.0, nor any JBoss code itself. It turns out that when the JSF implementation was changed from MyFaces to Sun's JSF-RI as part of the JBoss and Seam upgrade I did, the default content mime type changed as well. JSF-RI sets it to application/xhtml+xml. The fix was simple, add the following tag just before the <head> tag in each .xhtml faclets page:

<f:view contentType="text/html"/>

Index page issues when putting JBoss behind Apache

Wednesday, November 8th, 2006

So, if you're using Seam, you usually have xhtml files which represent the pages, and then the Seam servlet takes care of rendering them. When I setup my latest project, I changed the web.xml to switch from using page.seam to page.html, to mask the back-end technology. When I did this, I also deleted the seemly unnecessary index.html that was sitting in my view directory. I then added this into my web.xml, just to be on the safe side:

	&lt;welcome-file-list&gt;
		&lt;welcome-file&gt;index.html&lt;/welcome-file&gt;
	&lt;/welcome-file-list&gt;

(more...)