TO THE NEW Blog PAGES

Grails

Grails unit testing for beginners

Ques: How is unit testing different from integration testing ? Ans: Integration tests need to bring up the whole grails environment.They talk to the database. All the dynamic GORM methods and properties are available here. Unit testing are small focused, fast loading tests that do not load supporting components. Ques: How can I unit test […]

Grails

Finding User’s Session Locale in GSP

There are situations where you might want to know the Locale of the user as set in the session in your GSP so that you can show text in a particular language/manner. Here the Spring framework’s SessionLocaleResolver can come to the rescue. In one of our recent Grails projects, we did the following in one […]

Technology

Generating stubs for SOAP calls using IntelliJ IDEA

Since working with SOAP calls in XML is very tiresome, we have libraries like axis and wsdl2java to generate stubs to make web-service client calls. I generated the stubs using IntelliJ IDEA to make SOAP calls in grails using the steps below. 1. Adding Framework Support If the IntelliJ project does not already have the […]

Sachin
Sachin
Read

Grails

Grails Hibernate Filter Plugin a Life Saver

The project I am currently working on is also accessible from the iPhone. In the last few months so many changes have been done on the web application (developed in groovy/grails). Now the client wants the same thing on iPhone as well. He has a separate development team for iPhone application. The iPhone application developer […]

Grails

Integrating Java Application with Twitter

These are few basic steps which will help you to integrate your java application with twitter using twitter4j. Twitter4J is a Java library for the Twitter API. With Twitter4J, you can easily integrate your Java application with the Twitter. Steps : 1) Register your application at http://twitter.com/apps 2) Twitter will return Consumer Key and Consumer […]

Technology

Merge two PDF files

In my current project the user has the option to add pdf file into the system. Recently we got the requirement to add a cover page to each pdf document that user downloads. We were already using the iText API for generating pdf so the task to do that was easy. After going through the […]

Grails

Suppress Tracking of various scripts on test and development environment

In my recent project, every time the page loads, it loads with lots of scripts making calls to and getting content from googleapis, fb, clixpy, cdn etc. to provide the functionality, due to which the page loads very slowly and this led to the wastage of time to test a certain functionality. To overcome this […]

Grails

Deploying Grails application on Websphere Application Server V6

Hi, In one of my projects, I needed to deploy the grails application on IBM Websphere Application Server Version 6. So the steps I followed to deploy the application are as follows:- Step-1: Install the IBM Websphere Application Server 6.x 1. Install the Websphere Application Server using its installer. (If it is needed to be […]

Technology

Rounded corner and CSS3 Gradient with border

First download these files: http://code.jquery.com/jquery-1.4.2.min.js You can round corner DIV, LI tags and others You add a class where you want round corner Add this CSS: .cornerBox ul li.corner{zoom:1;border:0;filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=’#1f858f’,EndColorstr=’#329ba6′);background:-webkit-gradient(linear, left top, left bottom, from(#1f858f), to(#329ba6));background:-moz-linear-gradient(top, #1f858f, #329ba6);background:#1f858f;} .cornerBox ul div.outer {background:#fff;padding:0;margin-top:15px;} Add this jQuery code: $(function(){ $(‘.corner’).wrap(‘ ‘); $(‘.corner’).corner(“round 3px”).parent().css(‘padding’, ‘1px’).corner(“round 3px”) }); Hope this […]

Umar
Umar
Read

Technology

Drop unique constraint in MySQL

Recently in my Grails project I mentioned a domain field as unique in constraints. So the table automatically created also had the same constraint, but as the requirement changed the field was not supposed to be unique. Now we need to remove that constraint from the database table as well. The trick in MySQL is […]