JSF, PhaseListeners, and GET Requests

April 25th, 2006

UPDATE: For a missing piece of code, please see this entry.

In one of our applications at work, we needed to be able to deep link to certain pages to allow external applications to get at specific pieces of data, product and order information to be specific. Since JSF 1.x does not support HTTP GET requests, this poses a problem. In order to get (no pun intended) information to the backing bean for processing, the data would have to be POSTed. This obviously makes bookmarking the resulting page useless. Our initial solution was to write a servlet filter which would get a reference to the current FacesContext, then get a reference to the appropriate JSF managed bean, and pump data into it. This actually worked rather well, but, at Ed Burns’ suggestion, I decided to reimplement this a JSF PhaseListener (many thanks to Ryan Lubke for his help!). A PhaseListener is “an interface implemented by objects that wish to be notified at the beginning and ending of processing for each standard phase of the request processing lifecycle.”
(more…)

Popularity: 16% [?]

MyEclipse and Glassfish

April 21st, 2006

My shop has adopted MyEclipse as the standard development environment. Our recent adoption of Glassfish, though, makes things a little difficult for MyEclipse (and likely Eclipse in general) as integration with the app server has not yet landed in any GA release that I’m aware of. This difficulty, however, is not insurmountable. Let’s take a look at how to debug a Glassfish-hosted application using (My)Eclipse.

(more…)

Popularity: 4% [?]

JIRA and Glassfish

April 19th, 2006

Officially, Glassfish is not a supported platform for JIRA, Atlassian’s extremly popular issue tracker. Since we’re migrating to Glassfish at work, it’s pretty important that we get it the two to work together. As it turns out, it’s really not that bad at all. Here’s what I had to do to get JIRA, PostgreSQL, Active Directory and Glassfish all playing nicely together.

(more…)

Popularity: 9% [?]

New Blog Site

April 19th, 2006

I have decided to do my blogging here, rather than inside Joomla! on the (mostly working) main site.  I think things will be a bit easier to manage here, with a little less clutter on the main site.  Since I didn’t have much there, that shouldn’t be an issue for anyone at all. :)

On the “mostly working” part, an explanation is probably due.  I changed hosts, and just copied the DB to use with a new installation of Joomla!, so the database thinks there are certain plugins installed, while the filesystem doesn’t know anything about them, so some things are broken.  I’ll get around to fixing that soon, I hope, but there are higher priority items on my plate at the moment.

Popularity: 5% [?]

JSF and Annotations

April 14th, 2006

Recently at work, we looked, ever so briefly, at a new web framework called Stripes. It looked rather cool, as it was largely annotation-based, but, given its glaring lack of any wide-spread usage, we never seriously considered it. Today, I was on The Server Side (you do read TSS, right? ;) ) and noticed that Struts has released a Java 5 addon. One of the additions is annotation support whose only problem appears to be that it’s tied to Struts (that’s a joke ;) ).
(more…)

Popularity: 3% [?]

JSF and File Downloads, Take Two

April 5th, 2006

Yesterday, I detailed some issues I was having getting a JSF app to allow the download of an Excel spreadsheet as the result of a backing bean action being called. My solution involved a servlet and some JavaScript, with just a pinch a fistful of kludge.
(more…)

Popularity: 3% [?]

JSF and File Downloads

April 4th, 2006

At IEC, we have an application used to report inventory counts. Part of the app creates an Excel spreadsheet using POI. The user selects a batch from a select/combo, click on the button, and the server sends them a spreadsheet. The basic work flow is this: (more…)

Popularity: 5% [?]

JSFOne Speaker Image
With many thanks to Kaushal Sheth
`