How do I create a urlmapping that maps controller A essentially as controller B?
I thought something like this would work, but no dice.
"/my/"(controller: 'other', action: '*')
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
When you specify a controller in UrlMappings, leave off the trailing “Controller” (e.g.
"my", instead of"myController"). You also need some way of choosing which action.You probably want something like
"/my/$action?"(controller: 'my'), which maps urls like/my/footo the foo action in MyController. The trailing question mark means the action part of the url is optional;/mywill triggerMyController.index.Note that the grails convention is already to map
/mytoMyControllerwith the default mapping"/$controller/$action?/$id?"{}, so you don’t need a special UrlMapping for your example. You might want to consider just using the defaults and follow the convention.