

14
Dec, 13
In this post i am going to talk about how we started monitoring the performance of our grails application. We have a big release coming up in couple of months and development on the product was going on from last 10 months. In one of our reviews last month we started...

30
Nov, 13
Grails logging/printing native SQL queries
Grails provide you to log all the hibernate queries by setting logSql=true in the DataSource.groovy file like: environments { development { dataSource { ... logSql = true } } ... But native SQL queries are not logged. To log the SQL queries add groovy.sql in you log4j...

27
Nov, 13
Integration with LinkedIn using Grails Oauth Plugin
Grails oauth plugin is an awesome plugin, using this you can integrate your application with several sites that provide oauth support. Following are the simple steps to integrate LinkedIn in you grails application: Step 1 : Install the Oauth plugin Open...

26
Nov, 13
generate link in grails services
We can easily generate links in grails controllers, gsps and tag libraries using g.link method of grails tag library. But tag libraries are not accessible in the grails services. Grails provide us grailsLinkGenerator bean to create link in grails services. First...

10
Nov, 13
Grails global beforeInsert and beforeUpdate
Grails domain classes has beforeInsert and beforeUpdate method that get fired before domain object is going to saved or updated respectively. class Person { def securityService String name Date signupDate String lastUpdatedBy def beforeInsert() { signupDate = new...

31
Oct, 13
Running Grails application and managing its dependencies with maven.
Running Grails application and managing its dependencies with maven is quite easy. You just need to issue the following command for generating the pom.xml. And then you can manage your Grails application’s dependencies with maven: grails create-pom my.company...

31
Oct, 13
Schedule quartz jobs
In my previous post here I demonstrated how to register a quartz job and trigger it manually. Now it’s time to move ahead and schedule quartz jobs with cron expression. Like I had created a generic class for manual jobs let’s create one for schedule jobs....

31
Oct, 13
Open browser window of specific size
window.open is a very usefull jQuery method to open a new tab window in the browser. Using window.open method we can also open browser window of specific size. <script type="text/javascript"> function showIndex() {...

30
Oct, 13
Running quartz jobs manually.
It’s fairly simple to create quartz jobs and trigger them manually on the fly. In a maven module, we’ll start by adding quartz dependency to our pom.xml like this: <dependency>...

30
Oct, 13
Lambda expressions with Java 8
Recently, Java 8 has surfaced with support for Lambda expressions. Being a coding enthusiast I just couldn’t hold back my curiosity and got busy with it. After reading official docs and random coding I found it quite easy and interesting enough. It’s one...

30
Oct, 13
Create jrxml file dynamically using dynamic jasper in grails
Hi , This is my second blog on jasper report. I will tell you that How to create a dynmic jrxml file using dynamic jasper. In my previous blog I have discussed integration of jasper report in grails. For using Dynamic jasper we need two jar file,...

24
Oct, 13
Handling Image upload and rendering in nodejs/Express
Express provides feature to handle form data for uploading files and rendering their content, unfortunately most of the docs and tutorials I saw on internet were either outdated or didn’t work, so I making this post here to illustrate how to use and explain...

24
Oct, 13
grails groovy collectReplacements: replace characters with given strings
While searching something on net I found an interesting method of groovy collectReplacements. This method iterate through the string character by character and replace the matching character with the given string. This method take closure as an argument. [php]assert...

21
Oct, 13
First and last instance of grails domain class
Grails 2.x provide methods to retrieves the first and last instance of the domain class. User.first() User.last() Here we can pass name of the property to sort by. User.first('username') User.last('username') or User.first([sort: 'username']) User.first(sort:...

11
Oct, 13
Sending ampersand(&) inside value of jQuery AJAX
Following is the simple ajax I was using in the projects: jQuery.ajax({ url: "/controllerName/actionName", data: "testKey=" + testValue, success: function (data) { alert(data); } }); This works fine but if testValue contains ‘&’...

3
Oct, 13
AngularJs with Jade mixing problem
I’ve been struck with a strange problems from last few days, and all my tweaks resulted in vain, finally got to resolve it. Since, I’m still not much adapted to the idea of writing jade and debugging, I thought why not simply write those codes in html and...

1
Oct, 13
Exclude jar dependencies from Grails plugin OR Jar
In grails we use the multiple plugins as dependencies and some time it is likely that more than one plugin is using the same jar dependencies of different versions. This scenario will result in a conflict. To avoid such situation we can exclude the unwanted jar...

30
Sep, 13
Using Spring’s Java based configuration.
Using Spring’s Java based configuration is fairly straightforward and more flexible. In order to do it, you will have to annotate your java class, that is going to contain your beans, with @Configuration and as we have added the component-scan in our one post...

30
Sep, 13
Configuring auto discovery in Spring application.
Configuring auto-discovery for spring beans is quite easy and straight forward in the spring application. With auto-discovery in place, you won’t have to manually register the beans in spring config files. This is a way to minimize the xml verbosity in your...

30
Sep, 13
Resolving values from properties file in Spring.
It’s a good idea to resolve the configuration properties from external files and Spring supports this feature which is quite easy to use. You just need to put the properties file(s) in the classpath, for example in the Maven application...
Recent Comments