class UrlMappings {
static mappings = {
"/" (controller: "login", action: "index")
"/search" (controller: "caseSearch", action: "index")
"/${id}.xml" {
controller = 'xmlMncis'
action = 'index'
}
"/$controller/id/$id" {
action = 'index'
}
"/$controller/$action?/$id?" {
}
"500"(view: '/error')
}
}
But, when I go to /app/1234.xml, this is what I get:
[94945] filter.UrlMappingsFilter Executing URL mapping filter...
[94945] filter.UrlMappingsFilter URL Mappings
------------
org.codehaus.groovy.grails.web.mapping.ResponseCodeUrlMapping@9b5cd2
/(*).xml
/search
/
/(*)/id/(*)
/(*)/(*)?/(*)?
[94946] mapping.DefaultUrlMappingsHolder Attempting to match URI [/1234] with pattern [500]
[94946] mapping.DefaultUrlMappingsHolder Attempting to match URI [/1234] with pattern [/(*).xml]
[94946] mapping.DefaultUrlMappingsHolder Attempting to match URI [/1234] with pattern [/search]
[94946] mapping.DefaultUrlMappingsHolder Attempting to match URI [/1234] with pattern [/]
[94946] mapping.DefaultUrlMappingsHolder Attempting to match URI [/1234] with pattern [/(*)/id/(*)]
[94946] mapping.DefaultUrlMappingsHolder Attempting to match URI [/1234] with pattern [/(*)/(*)?/(*)?]
[94956] mapping.DefaultUrlMappingsHolder Matched URI [/1234] with pattern [/(*)/(*)?/(*)?], adding
to posibilities
So, it's stripping off the file type. How do I get access to the file type from my controller, and
how do I get it to respect that style of URL?
~~ Robert.
I'll let you know how that goes for me.
~~ Robert.