Grails

Uploading a file using only Ajax

We often need to upload a file without refreshing page or even before user submits the complete form. We have been using flash uploaders or i-frames to achieve that. However now it is possible to upload a file using only ajax and javascript. The first thing we need is a HTML form that will allow […]

Grails

Using Groovy’s HTTP Builder Library

In my Grails app project, I had a requirement to make an HTTP call from the server’s end. After a lot of searching, I found some old fashioned Java code to achieve what I was looking for. But I was looking for something more clean, concise and more importantly a groovier way of doing it. […]

jeevesh
jeevesh
Read

Grails

OAuth 2.0 using Grails Part – 2

Obtain accessToken from refreshToken In the previous article OAuth 2.0 using Grails Part – 1 I have given a detailed explanation regarding user authentication using OAuth 2.0. In this article i will explain how you can obtain access_token from the refresh_token. Please refer to step(3) of part – 1 of this article where we obtained […]

pulkit
pulkit
Read

Grails

Managing parallel versions of multiple Grails SDK(Software Development Kits) on Unix based systems by GVM

Sometimes we face a problem with our grails system, means we have many applications to work with which are built using different grails versions. So switching between grails version is a terrible task, like switching symbolic links or changing GRAILS_HOME environment variable each time when we run our different application.   How can we solve […]

Grails

Receive Email using SubEthaSMTP (The local SMTP server).

In my Grails app, I came across a requirement of setting up an SMTP server for receiving mails and extracting their content. After exploring a lot I found SubEthaSMTP to be the most suitable. SubEthaSMTP lets your application receive an SMTP mail very easily. To setup an SMTP server in your application, You need to […]

Grails

Generate Excel Sheet with Formula embedded in it

Recently in our application, we needed to generate an excel sheet where some of the values for the column needed to be calculated on the basis of values of other columns depending upon an embedded formula in the excel sheet. To work with excel file we need the following in your BuildConfig.groovy: [java] dependencies{ compile […]

Grails

OAuth 2.0 using Grails Part – 1

Following steps need to be followed for OAuth 2.0 authentication : (1) Obtain OAuth 2.0 credentials from the Google Developers Console: First you need to have a google account. create a project at Google Developers Console after logging into your Google account. Click on the project name go to “APIs and auth” click on credentianls […]

pulkit
pulkit
Read

Grails

Grails ‘integrate-with’ command

While reading the Grails docs I came across a useful Grails command i.e. integrate-with. In this short blog I just want to present some of the uses of this command. By using this command we can create Git’s .gitignore file: [java] grails integrate-with –git [/java] The above command will create a .gitignore file in the […]

Grails

Facebook Oauth for fetching page token

OAuth is a secure mechanism to access facebook. To access facebook in your grails application you need to create a facebook app, go to https://developers.facebook.com, click on Apps dropdown, further click on ‘Create a new App’. Ensure that you register the URL of you application with the Facebook app you have setup. Save your apiKey […]

Services