Jersey 1.x and 2.x Cross-Site Scripting XSS Filter for Java Web Apps

This post is going to show you how to build a Jersey Cross-Site Scripting XSS filter for Java Web Apps. As we all know, when building a web application of any sort it’s always important to focus on security. Cross-Site Scripting (XSS) is a popular security issue found across many sites. Here is a brief summary on the current XSS situation and a good Cheat Sheet provided by OWASP.

How to Asynchronously Load Backbone View Templates

During the development of our third party widgets we decided to use a templating library like Backbone recommends. A templating library would allow the HTML code to be separated from the JavaScript, maximising re-use and avoiding code cluttered with ugly HTML. Ultimately all the templates would be bundled together and packaged into the compressed, single file version of the widgets. However, we still wanted the templates to be retrievable remotely, as and when they were needed. The templating library used below is the one provided by Lo-Dash but it could just as easily be any other library. So here goes, this is how you would asynchronously load backbone view templates.

Quantum Revolution

I came across this video today and it’s quite amazing. I had to share it. The possibilities are infinite and the potential for exponential evolution is at our door step.

Using Java to Create Grayscale Images and Icons

This article is going to cover how to use Java to create grayscale images from their colour counter-parts. When I started looking into this topic I did a quick Google search and found many different answers using many different libraries with considerably different outputs. So I decided to put together this post describing the outcome of my Quest For the Holy Gray.