Hi Guys, In one of my projects, While working with jasper reports, one of the requirement I faced was of passing optional parameter to the sql query in jasper report. For eg. I had to write a query to find all new customers which were added between two given dates and if an optional status […]
While implementing Security in my Sample Application I have read various types of Injection attacks that an application may suffer. Reference: Grails In Action 1. SQL Injection Attack: def username=”gautam” Post.findAll(” from Post as post WHERE post.user.username=’${username}’ “) This Query uses a local username property to control which posts are returned. Try this Query in […]
In recent poc, i have set the expires HTTP header on server response for one of the project, such that it will again set when access by user for the specified period, if header is expired already. The module that control it is “mod_expires.c”. This module is not enabled by default. You need to enable […]
Our project went into production a few weeks back and was on Grails 1.3.1. Since the code was stable, we decided that it was time to upgrade to grails 1.3.4. However, we didn’t want to push it straight to the QA Server or Production server because that would’ve meant that the maintenance of the existing […]
Grails docs are the best source to understand how to make best use of GORM methods and now the GORM Gotcha’s series By Peter Ledbrook is also making the docs easy to understand. So many time it happens when the domain instance values gets updated without calling save method.It happens because the object is attached […]
Recently I got a query regarding mapping a database table which do not have any id and version. For example the table have two varchar fields username and password nothing more than that. Although it was something strange for me that table doesn’t have the id field. The good thing is that the username is […]
The HTML <canvas> tag is used for creating graphics on the fly. It can be used for rendering graphs, game graphics, or other visual images. To draw on the canvas, the <canvas> tag is used in conjunction with the getContext(contextId) method. Any content between the <canvas></canvas> tags is “fallback content”- meaning, it will […]