JSF on Tomcat 6

I tried my hands on JSF last Friday. It didn’t go as smoothly as I expected.

Being the bleeding edge kind of person :P I set it up using Tomcat 6 and a quick start package from Exadel. The package already has all the jar files you need and you only need to type in (orĀ  cut-and-paste) some missing java code and jsp scripts. That done, I tried accessing /jskfs/pages. It didn’t work so I tried accessing directly inputname.jsp:

java.lang.NullPointerException
com.sun.faces.taglib.jsf_core.LoadBundleTag.doStartTag(LoadBundleTag.java:96)

I figured, hey maybe I should try the latest reference implementation. That would also be in keeping up with being a bleeding edge kind of person :P So I went to Sun and downloaded latestĀ  reference implementation mojarra-1.2_09-b02-FCS-binary.zip, installed it to /jskfs/WEB-INF/lib, and again tried accessing inputname.jsp:

javax.servlet.ServletException: java.lang.NoSuchMethodError: com.sun.faces.taglib.jsf_core.LoadBundleTag.setBasename(Ljava/lang/String;)

It got worse. Figuring that the reference implementation is incomplete (don’t ask why). So I went to Apache.org and downloaded MyFaces, their implementation of JSF: myfaces-core-1.2.4-bin.zip. I installed it and tried again:

SEVERE: Error configuring application listener of class com.sun.faces.config.ConfigureListener

I took a look at the web.xml file, found, and commented this out:

<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>

I tried again:

javax.servlet.ServletException: java.lang.NoClassDefFoundError: com/sun/faces/taglib/jsf_core/LoadBundleTag

I read somewhere that flushing the web app’s files in the work directory sometimes works so I did and then tried again:

javax.servlet.jsp.JspException: No faces context?!
org.apache.myfaces.taglib.core.LoadBundleTag.doStartTag(LoadBundleTag.java:77)

I tried accessing via the entry point /jskfs/pages. It finally worked.

On a hunch, I went full circle and restored the original jar files, cleared the work directory, and tried accessing via the entry point again. Guess what? It worked 8-}

Why Linux Sucks

There are many reasons to love Linux. But there are also many reasons to hate it. And this is one of those reasons.

I’ve been trying to refresh Selene, my Thinkpad X22, since I returned my office-issue Thinkpad T60. I figured Linux would be a good idea as it had Kubuntu before and I was reasonably fine with it. Unfortunately, the only Linux installer I have on hand is Fedora Core 4 (circa 2005). It installed without a hitch BUT I was stuck with Firefox 1.0 which doesn’t support a lot of those Web 2.0 stuff out there.

I tried automatically updating Firefox but apparently the FC4 repository is no longer being maintained. It only contained a point release. My next recourse was to manually download and install Firefox 3.0. But it flat out doesn’t work. Missing library or something. I tried updating the library but, you guessed it, the repository is no longer being maintained.

I turns out that once a new version of the distro is released, the old version’s repository is available for only about a year and then that’s that. This means you need to reinstall your OS once a year! I could probably get things manually updated and working one way or the other but it would just be too much hassle.

Now contrast this with the much older Windows 2000 Professional which installs fine, gets updates fine, and runs Firefox 3.0 just fine, thank you. Now if only I can get rid of the damn spyware that keeps infecting it.

Firefox 3 Is OUT!

I’ve been using the betas and the release candidates of Firefox 3 for some time. But now the final is out! I, of course, am already using it. Based on my experience using the betas, RCs, and now the final, it’s definitely a huge improvement over Firefox 2. My biggest irritation with Firefox 2 has been the memory leak and it seems to be gone or at least majorly minimized. That alone is good reason to use Firefox 3. Get it here! Now!

Upgraded to WordPress 2.5

I’ve been meaning to upgrade to WordPress 2.5 since it came out way back end of March but I was always either busy or lazy. But I finally did tonight while waiting for the time. But of course, I still just took the 5-minute upgrade procedure. As you can see, it worked :P

So what’s new? A lot. According to the release notes: multi-file uploading, one-click plugin upgrades, built-in galleries, customizable dashboard, salted passwords and cookie encryption, media library, a WYSIWYG that doesn’t mess with your code, concurrent post editing protection, full-screen writing, and search that covers posts and pages.

I’ll see how nice or not these things are soon enough.