July 26th, 2013 by Lincoln Baxter III

Rewrite 2.0.5.Final Released

We are pleased to announce the release of Rewrite 2.0.5.Final, which includes several bug fixes and enhancements.

Rewrite is an OpenSource, Filter-based Servlets extension for Java – enabling creation of bookmark-able, pretty URLs. Rewrite solves the “RESTful URL” problem elegantly, including features such as: page-load actions, managed parameter parsing, seamless integration with CDI, Spring, and configuration-free compatibility with other web frameworks.

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.

Go get Rewrite now!

We hope you enjoy this latest release of Rewrite!
~Lincoln and the Rewrite Team

July 23rd, 2013 by Lincoln Baxter III

Guide to Regular Expressions in Java (Part 2)

Often unknown, or heralded as confusing, regular expressions have defined the standard for powerful text manipulation and search. Without them, many of the applications we know today would not function. This two-part series explores the basics of regular expressions in Java, and provides tutorial examples in the hopes of spreading love for our pattern-matching friends. (Read part one.)
July 22nd, 2013 by Lincoln Baxter III

Guide to Regular Expressions in Java (Part 1)

Often unknown, or heralded as confusing, regular expressions (regex) have defined the standard for powerful text manipulation and search. Without them, many of the applications we know today would not function. This two-part series explores the basics of regular expressions in Java, and provides tutorial examples in the hopes of spreading love for our pattern-matching friends. (Read part two.)
July 4th, 2013 by Lincoln Baxter III

An even better visual regular expression tester

For those of you who have not seen the Visual Regex Tester yet, this video should be informative, and for those of you who have, make sure to check out the new reverse-syntax highlighting features that I’ve recently added. My goal is to make this tester as useful and fun as possible; it should be a regular stable of regular expression development.

June 14th, 2013 by Lincoln Baxter III

Drop-in migration from MySQL to Percona DB in two minutes

Percona DB is a drop-in replacement for the MySQL database, and as you’d hope for a business model based on providing out-of-box performance enhancements, the install is a complete breeze.

June 4th, 2013 by Lincoln Baxter III

Upcoming Conference Appearances for OCPsoft

I’d like to take a brief moment to let everyone know that we’re going on a Conference Tour! I’ll be presenting on [[Rewrite]] at South-east Linux Fest (FREE) in Charlotte, North Carolina at the Blake Hotel (June 7-9).

I’ll also be presenting [[Rewrite]], Errai, and JBoss Forge at JUDCon Boston 2013 (June 9-11):

So please come join me for a fun and hopefully informative few sessions!

May 28th, 2013 by Lincoln Baxter III

Announcing PrettyTime :: NLP Natural Date Processing

If you have ever used Google Calendar, Siri, Android Voice Command or other natural language tools, you might be familiar with convenient calendar features and voice calendar control. android_voice_scheduling “Schedule a dinner party for six pm, next Thursday,” and The start time for your dinner party conveniently shows up, ready for your finishing touch. But how does this work? Can we use it for our own applications?

If you’ve given this a bit of thought, you’ve probably figured out that in order to understand grammar, the nearly infinite possible combinations of words, expressions, numbers, and dialects should require a not insignificant amount of computing power, and a good deal of creativity.

May 4th, 2013 by Daniel Sachse

Migrating from PrettyFaces to Rewrite – Simplicity meets power

Hi Java web-developers. I hope you are already familiar with [[PrettyFaces]]. If not, I will give you a very short introduction taken from the project documentation:

PrettyFaces is:

“The open-source /url/#{rewriting} solution for Servlet, JSF, and Java EE, including features such as: page-load actions, seamless integration with faces navigation, dynamic view-id assignment, managed parameter parsing, and configuration-free compatibility with other web frameworks.”

[[Rewrite]], on the other hand, is a URL-rewriting framework built for extendability, for use with any web-framework or pure Servlet itself, and is used for the core of PrettyFaces “4.0” – bringing the best of both worlds… so that sounds very cool thus far, but what do we want to achieve with it? Why would we use either of these frameworks?

April 3rd, 2013 by Lincoln Baxter III

Set up an anti-spam filter for your website with mod_security and fail2ban

top apache2 cpu usage

Frequently spammers target products such as wordpress, web forum software, phpMyAdmin, and other common tools used by hobbyist and professional website administrators.

Whether you are hosting your own blog, or running a website for your company or more, it can be difficult to deal with the increasing amount of malicious web traffic seen on a daily basis, while still allowing friendly crawlers such as Google, Yahoo, and MSN search engines.

This harmful and wasteful traffic may damage your system or simply waste its resources, slowing down the site for your more welcome users. If this sounds familiar to you, but your page hits don’t seem to add up, then you may want to consider taking some of the measures outlined below in order to secure your site from harmful hacks and sluggish spam.

February 25th, 2013 by Matyas Danter

Setting up Google OAuth2 with Java

oauth_logo

For all of you who are trying to figure out how to integrate with Google’s single sign-on functionality, this article might be for you. I’ve taken the liberty of condensing all of the actual logic required to perform OAuth Google login, and provided it as a class and a JSP (seen below). In order to follow along better, I suggest cloning the example GitHub repository, and deploying to the application to your server of choice.