Grails, Technology

Grails Filter at top of Filter Invocation Chain

Sometimes in a web application we need filtering on request to a resource or on response, or on both. In Grails, it could be done easily via creating a filter. Just run grails create-filters [filter-name] and it will generate a filter in the application. To run a filter before all other filters, just put that filter at top of other...

by Sandeep Poonia
Tag: grails filter


Enhance HttpServletRequest using metaprogramming

Most of the times we use request.getHeader("user-agent") to get the client browser user-agent details inside the Grails Filters or Controllers. User-agent is one of the examples. There are so many such methods e.g. method for checking whether the request was an ajax call, getting IP address of the client machine, checking whether the...

by Bhagwat Kumar
Tag: grails filter