We are pleased to announce the latest version of the Rewrite Servlet Toolkit, and PrettyFaces libraries. It’s been quite a while since our last release, but we promise you this new version has been worth the wait.

Release notes:

You might notice we skipped a few version numbers, which we’ve done for several reasons:

This is a major update, so we incremented from major version 2 to version 3.

The deprecated (original) prettyfaces-jsf library, which is now several years obsolete was versioned 3.3.3, and has been confusing new users for some time. We are now resolving this issue by skipping directly to Rewrite version 3.4.0.Final.

This release includes several major new features as well as a plethora of bug-fixes, including:

Support for JDK6 has been dropped, JDK7 is the new minimum requirement

Highlights

Security Notice

If you are currently using Rewrite 2.0.9.Final and have not yet updated, you should update to Rewrite 2.0.10.Final or 2.0.11.Final as quickly as possible, since we have fixed a minor concurrency issue when using the PhaseOperation configuration element that can potentially cause cross-request information bleeding.

Rewrite 2.0.9.Final

We are proud to announce the availability of Rewrite 2.0.9.Final, which introduces “rewrite-config-proxy”, fixes several minor issues, and adds support for Response.isCommitted(), making it far simpler to perform certain operations if the response has already been committed by a prior rule or 3rd party servlet filter.

rewrite-config-proxy

Provides an easy-to-use Operation that allows any inbound request to be proxied to another URL – even on a different server. Headers, cookies, etc, are preserved:

To use this configuration extension, you will need to add it to your POM file:

response.isCommitted()

Provides a simple condition for determining whether the response has been committed or not for the current request. This is useful for aborting rewrite processing after a certain point in your configuration:

Get the updates

We are proud to announce the 3.2.1.Final version of PrettyTime. This release includes several bug-fixes, an improved NLP (time parsing) module, and a new method for more convenient configuration of time units:

public void exampleUnitConfiguration() {
JustNow unit = t.getUnit(JustNow.class);
unit.setMaxQuantity(1);
// This means that "just now" will only be used to represent one millisecond difference between the target time and reference time. (the default is 5 minutes.)
}

Improvements in the NLP module (based on Natty.) include more resilient parsing of date offsets such as “the day before yesterday,” which previously resulted in a date that actually represented “yesterday.”

Bug Fixes

Erroneous failures such as the following exception should be fixed by this release:

org.ocpsoft.rewrite.exception.ParameterizationException: The value of required parameter [s] was null.
at org.ocpsoft.rewrite.param.RegexParameterizedPatternBuilder.extractBoundValues(RegexParameterizedPatternBuilder.java:262)
at org.ocpsoft.rewrite.param.RegexParameterizedPatternBuilder.build(RegexParameterizedPatternBuilder.java:136)
at org.ocpsoft.rewrite.servlet.config.Forward.performHttp(Forward.java:85)
at org.ocpsoft.rewrite.servlet.config.HttpOperation.perform(HttpOperation.java:42)
at org.ocpsoft.rewrite.servlet.config.rule.Join.perform(Join.java:264)

Bug fixes in 2.0.5.Final

Issue #109 – Context root is appended twice when using Navigate.to() class Issue #110 – View IDs with hard-coded query parameters were working in PrettyFaces 3, but no longer in PrettyFaces with Rewrite.

Other critical issues fixed in prior releases have continued to be tested for security holes. If you use container-based security, and have not yet upgraded from Rewrite 2.0.3.Final, you should Immediately upgrade to 2.0.4 or 2.0.5.Final because of the following issue:

Critical issue in 2.0.0.Final -> 2.0.3.Final

Issue 111 – Container based security is circumvented when Rewrite is installed

Documentation improvements

Additionally, we (mostly Christian) have put a good deal of work into the documentation and migration guide from Rewrite 1.x and PrettyFaces to Rewrite 2.x: You can find that guide here: http://ocpsoft.org/rewrite/docs/migration/prettyfaces3 – which is part of a larger effort to improve our documentation entirely. And of course, if you have any questions or concerns, please let us know on the forums, or submit an issue to our issue tracker.

Output buffering is a feature often desired but rarely properly implemented – Properly resetting the Response stream, preserving headers correctly, writing to disk so you don’t overflow the JVM memory space – in Rewrite, we hope to make this attainable for anyone seeking to do things like:

Dynamic minification of HTML, JavaScript, and/or CSS files

Modification of output HTML or content before it is sent to the client.

Reduction of build and development complexity by transforming LESS or SASS files into CSS on the Server

Now, using the Rewrite’s “OutputBuffer” API introduced in the new version 1.1.0.Final, you can finally achieve this in just a few lines of code, either by wrapping a stream, or simply modifying the contents directly!

Get [[PrettyFaces | version 3.3.3]] of PrettyFaces now! See how simple URL-rewriting can be, with the power of open-source tools at your fingertips.

Thanks goes out to all of the developers who contributed to this release; a lot of work has been done, particularly in the realms of stability, performance, and inter-operability with other frameworks.