Grails Redirecting to an error page

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Grails Redirecting to an error page

milinrshah
This post was updated on .
In my current application, I am throwing a custom runtime exception from my service and catching it on controller. And based on exception I want to show a message to user. But currently I have been redirecting to a error page.

So instead of redirecting to error page, I want user to be on the same page and want to show a customized message.

I have also tried to comment out error mapping line URLMappings.groovy. But didn't get any luck.

I have used grails 2.3.5 and following plugins

build ":tomcat:7.0.50"

compile ":scaffolding:2.0.1"
compile ':cache:1.1.1'
compile ":shiro:1.2.0", {
        exclude "quartz"
}
compile ":sharding:1.0"

runtime ":hibernate:3.6.10.7" // or ":hibernate4:4.1.11.1"
runtime ":database-migration:1.3.5"
runtime ":jquery:1.10.2"
runtime ":resources:1.2.1"
runtime ":cors:1.1.0"
runtime ":twitter-bootstrap:3.0.2"
runtime ":fields:1.3"
runtime ":external-config-reload:1.4.1"
compile ":quartz2:2.1.6.2"

Has anyone faced this kind of situation?

Help would be much appreciated.