URL Mapping collision with params

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

URL Mapping collision with params

handsdown
Hello-
I have a URLMapping:
"/myThing/customId/$action"(controller:"myThing")

However, in my application, I have to accept actual query string parameters from a client that could be anything.  I have no way of knowing what these parameters could be - so the user could supply a parameter with name "customId" or "action"

Is there a way to separate the URL mapping variables from actual query string parameters?  

I suppose I could obfuscate  the variables with my own pseudo-namespacing ($mySitesVeryOwnNamespace-customId).  But that is rather hack-ish.  Even so, Grails specifically looks for certain variable names for some of it's auto-plumbing stuff ($controller, $action, $id), so those cannot be changed.

Anyone else run into this?
Reply | Threaded
Open this post in threaded view
|

Re: URL Mapping collision with params

handsdown
typo:
"customId" was supposed to be a variable in that post...

"/myThing/$customId/$action"(controller:"myThing")