tags:

views:

35

answers:

1

By default SomeController.groovy has a controller name of some. Also, pkg.SomeController has a controller name of pkg/some.

Is there a way to plug a custom mechanism for this translation. In my particular instance I want to get rid of the pkg (it's a long story why I need this)

I can try to use @Controller("name") but given the number of existing controllers this is less preferable.

A: 

I was wondering if there's a customized URL mapping defined in your Grails project (look at grails-app/conf/*UrlMappings.groovy)? As far as I understand, the package name shouldn't show up in the URL by default.

Christoph Metzendorf
yes, I have a custom mapping. I don't mean the URL part. I mean when the controller is referenced by name - for example in filter definitions, or in `<g:createLink`
Bozho
I browsed the source of createLink and it seems it uses the defined URL mapping as well. However, there's also an optional mapping parameter to explicitly reference a named URL mapping. Maybe this helps...
Christoph Metzendorf