url mapping - Grails, different url for same controller and action -


i have urlmappings in grails

"/"(controller: 'home', action: 'index') "/$id"(controller: 'home', action: 'index')

is there better way write this, without duplicate code? if use one, other urlmapping won't work.

thanks in advance

if want combine 2 url mappings can making id parameter optional this:

"/$id?"(controller: 'home', action: 'index')


Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

order - Notification for user in user account opencart -