elacheche
elacheche

Reputation: 71

Grails dynamic baseurl for multi-url webapp

Any one have an idea how to use a dynamic baseurl??

f.e: I have file.war and I want to deploy the same war for www.webapp1.com & www.webapp2.com

I tried to use alias for my server.xml host, and I tried to use a separated host in server.xml.. but every time I try webapp2.com url I get the webapp1.com.

Upvotes: 3

Views: 141

Answers (1)

Andrew
Andrew

Reputation: 2249

Grails registers a bean named grailsLinkGenerator. I believe you can accomplish what you're trying to do by overriding this bean with your own custom logic. Your bean must implement the LinkGenerator interface. You might find it easiest to extend DefaultLinkGenerator or CachingLinkGenerator

Upvotes: 3

Related Questions