I have a controller where I'm trying to set defaults based on the url - but have all of the requests going to one controller. Trying to extend the answer in : URLMapping to direct all request to a single controller/action
I did this in URLMappings.groovy
"/**"(controller:"lab", action:"index", params:[labName:action])
Where I was hoping I could add the original action name to the parameters, but this doesn't seem to do anything.
Any way I could have all the requests going to that controller mapped to one action, and see what the original action name would be?
Action name is decided based on the url mapping not by the requested url. As you are using a single action, you will always get the action name as index. Based on your requirement below are some of the options that you can choose: