controller - Grails custom URL mapping for user nicknames -


i have custom url name requirement.

each user have custom page , must @ root of domain

for example: http:www.bemdireto.com.br/eduardo

this conflict default controller's mapping.

the application exists, cannot change controllers url.

we have came following code

 "/$controller/$action?/$id?"{      controller = {     def log = logger.getlogger('br.com.fisgo.urlmappings')      log.trace "verifying if broker hot site or controller"      def uri = delegate.getcurrentrequest().getrequesturi()     log.info "acessando uri: ${uri}"      urlmappingutil.handlebrokerhotsitecontroller(uri, {owner ->        params.owner = owner        })     }          action = {             def uri = delegate.getcurrentrequest().getrequesturi()             urlmappingutil.handlebrokerhotsiteaction(uri)         }     } 

the method urlmappingutil.handlebrokerhotsitecontroller tell controller , nickname apart.

the problem is: method being executed 7 times each request.

i can't find reason why.

i've noticed urlmapping called 3 times before de urlmappingsfilter , 4 after.

link generators tied urlmappings, true when not using default cachinglinkgenerator.

some of code in urlmappingutil might impact it.

check number of links in page. if observation still same, may want implement own urlmappingevaluator.


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -