Quantcast

ApplicationTagLib createLink

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

ApplicationTagLib createLink

abhijith.prabhakar
Hi All,

I have a code which is using ApplicationTagLib.createLink to get absolute url.  It works fine as long as I am running the code on localhost:8080.

But, once I put apache webserver on front, createLink is still picking localhost:8080 instead of apache web server url.  

Is there anyway I can get webserver url instead of server url?

Thanks,
Abhijith
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: ApplicationTagLib createLink

bond_

There is a configuration parameter for that job "grails.serverURL" check for it in the documentation.

On Aug 9, 2012 8:11 AM, "abhijith.prabhakar" <[hidden email]> wrote:
Hi All,

I have a code which is using ApplicationTagLib.createLink to get absolute
url.  It works fine as long as I am running the code on localhost:8080.

But, once I put apache webserver on front, createLink is still picking
localhost:8080 instead of apache web server url.

Is there anyway I can get webserver url instead of server url?

Thanks,
Abhijith



--
View this message in context: http://grails.1312388.n4.nabble.com/ApplicationTagLib-createLink-tp4632925.html
Sent from the Grails - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: ApplicationTagLib createLink

Andrew Todd
On Thu, Aug 9, 2012 at 1:24 AM, Raviteja Lokineni
<[hidden email]> wrote:
> There is a configuration parameter for that job "grails.serverURL" check for
> it in the documentation.

To clarify, the offending code is in the Spring Social plugin. Maybe
Abhi can provide a link to the Github source. The problem is that
grails.serverURL can become a serious pain, complicating testing and
configuration that we would rather centralize on our Apache reverse
proxy. It's better to avoid setting it at all, if possible.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: ApplicationTagLib createLink

abhijith.prabhakar
Yes, the code in Spring soical core grails plugin:
Link

More specifically below method in GrailsConnectSupport,

private String callbackUrl(NativeWebRequest request, String providerId) {
    return new ApplicationTagLib().createLink(mapping: mapping, absolute: true, params: [providerId: providerId])
  }
Loading...