Can someone explain this UrlMappings ?

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

Can someone explain this UrlMappings ?

İsmail Hakkı Ayaz

I use Grails 3.3.9. index.html is my spa and it is under src/main/webapp

I have AController and BController and both have namespace defined as "v1"
I have following `UrlMappings` 
class UrlMappings {
static mappings = {
       "/" (uri: '/index.html')

And my server.contextPath is  "/app/" in application.yml

All requests to controllers work flawlessly. For ex. /app/v1/a/someAction   /app/v1/b/anotherAction

My question is how the request "/app/a" resolves to the controller A. It seems like it ignores namespace defined in the mapping. It is not defined to do so in my UrlMappings. When it is defined as above this request should fail. If this is expected behavior how could I prevent it. If it is not I should open an issue for this.


You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit
For more options, visit