February 19th, 2010 by Lincoln Baxter III

Announcing – PrettyFaces 2.0.4: URL Rewriting for JSF 2.0

February 12th, 2010 by Lincoln Baxter III

20th Anniversary of a Photograph

Take a break from your software to read this: Today (February 12, 2010) marks the 20th anniversary of a remarkably simple, unimportant, yet incredibly special and sentimental event. A perspective that few consider in their daily lives.
February 4th, 2010 by Lincoln Baxter III

Safely add / modify Servlet request parameter values

PrettyFaces

Sometimes things are worth writing about.

While working on the PrettyFaces: bookmarking, and SEO extensions for JSF / JSF2, I came across a need to modify the current request parameters in order to “trick” the system into thinking that additional query parameters had been supplied.

Naively, I tried:

request.getParameterMap().put("name", new String[]{"value1", "value2"});
But that doesn’t work, because you aren’t allowed to modify request parameter values once the request has begun processing:
java.lang.IllegalStateException: Cannot find message associated with key parameterMap.locked at org.apache.catalina.util.ParameterMap.put(ParameterMap.java:213)