Q:

redirect from class to gsp page

I use grails and in service I have class in which before throw an exception it have to redirect to gsp page.
Is there anyone who know how to redirect from class to gsp?
Thanks in advance.

A:

Actually, redirect is designed to be used at the controllers, not services. Services should contain only the logic of your business, not the routing. Routing is the role of controllers. Moreover, if you throw an exception and then redirect, who will take the exception?
I think the better way is catching the exception thrown by the service at controller level, then do the redirecting. 
You can view more abour redirect command here.

