Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Problems with Grails 404 UrlMapping

Tags:

grails

I'm having some problems getting Grails to map my 404 errors to an errors controller like in the documentation. I'm running Grails 1.3.5 and when I add the following mapping to a default application:

"404" (controller:'errors', action:'notFound')

It works for mapping 500 errors but not 404's. I seem to recall having this problem before and it being related to Tomcat (vs Jetty) but I don't remember a fix or I thought it might have been resolved by now.

I try accessing a resource that's not defined like http://localhost:8080/appName/controllerName/blah and all I get is the default Tomcat 404.

I'm doing a standard grails run-app for testing and trying to get it to work.

like image 753
ahanson Avatar asked Nov 15 '10 03:11

ahanson


1 Answers

after deleting whitespace, the problem solved

"404"(controller:'errors', action:'notFound')

like image 77
Kerem Avatar answered Nov 02 '22 21:11

Kerem