November 13th, 2013 by Lincoln Baxter III

Creating a simple static file server with Rewrite

Today, I’d like to take a quick moment to demonstrate how to make a simple file server using [[Rewrite]], and any Servlet Container, such as Tomcat, Wildfly, or Jetty. This can enable much easier file updates for static content, such as preventing the need to re-deploy an entire application just to update an image, or document.

[[Rewrite]] is an open-source Routing ↑↓ and /url/{rewriting} solution for Servlet, Java Web Frameworks, and Java EE.

To start, you’ll need to include the Rewrite dependencies in your project. If you’re using maven, this is as simple as making sure your POM has the following entries (You’ll also need the Servlet API):

November 12th, 2013 by Lincoln Baxter III

PrettyTime 3.2.1.Final Released – Now with Czech language support

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.”

Get PrettyTime 3.2.1.Final and PrettyTime NLP 3.2.1.Final.