September 15th, 2013 by Lincoln Baxter III

Rewrite 2.0.7.Final Released – Bug fixes and enhancements

We are glad to announce the latest version of [[Rewrite]], servlet toolkit and URL-rewriting extensions. This release includes serveral bug fixes and enhancements:

Simplified Configuration

We heard you! It is now much easier to register ConfigurationProvider objects. You can forget about creating a service file, and simply use the convenient @RewriteConfiguration annotation:

import org.ocpsoft.logging.Logger.Level;
import org.ocpsoft.rewrite.annotation.RewriteConfiguration;
import org.ocpsoft.rewrite.config.Configuration;
import org.ocpsoft.rewrite.config.ConfigurationBuilder;
import org.ocpsoft.rewrite.config.Log;
import org.ocpsoft.rewrite.servlet.config.HttpConfigurationProvider;

@RewriteConfiguration
public class ApplicationConfigurationProvider extends HttpConfigurationProvider
{
   @Override
   public Configuration getConfiguration(ServletContext context)
   {
      return ConfigurationBuilder.begin()
         .addRule()
         .perform(Log.message(Log.message(Level.INFO, "Rewrite is active.")))
      ;
   }

   @Override
   public int priority()
   {
      return 0;
   }
}

Issues resolved

Upgrade to 2.0.7.Final

Read the installation guide, or configuration manual.

<dependency>
   <groupId>org.ocpsoft.rewrite</groupId>
   <artifactId>rewrite-servlet</artifactId>
   <version>2.0.7.Final</version>
</dependency>

Posted in Java, Releases

Leave a Comment




Please note: In order to submit code or special characters, wrap it in

[code lang="xml"][/code]
(for your language) - or your tags will be eaten.

Please note: Comment moderation is enabled and may delay your comment from appearing. There is no need to resubmit your comment.