Test forward method of Controller

This blogpost titled “Test forward method of Controller” explains the technique that can be used to test forward method of controller. Recently, I was writing test cases in grails to test an action : def performAction() { forward(controller:...

Nginx selective forwarding to tomcat

Nginx selective forwarding I encountered a situation today where Nginx had to forward all requests to tomcat except couple of URL’s which will be served by static content located inside Nginx root folder. This is what I did:   server { server_name...

Working with Stripe in Grails

In a recent project, I got a requirement to integrate a Payment gateway. I choose Stripe as it is PCI Level 1 complaint which is the most stringent level of all 4. Following are the steps to integrate stripe in Grails.   Create an Account on Stripe. Goto Account...

Spring Bean Life Cycle

Good Evening Folks. Every Java developer knows that at the time of creation of any object if some initialization is required we keep in constructor. Example. Class Math{ Math(){ // initialization code } } When it comes to J2EE Technology like Servlet we can do same...