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

Java 8 + Maven Javadoc plugin: Error fetching URL -

android - How to delete or change the searchview icon inside the SearchView actionBar? -

c++ - Msgpack packing bools bug -