got it. Whenever we run grails for development we use the embedded tomcat to run the application but once the application is run on test environment or production environment then because of performance concerns the grails app is added to a container and then deployed rather than using the run-app or run-war command.
So all i had to do was make a war of my application, add it to the webapps of my container and it worked like a charm.
Hope this helps someone stuck like me.