I have an External configuration file (${appName}-config.groovy) that I wanted to have a global URL declaration such as:

def DAS_SERVICE_URL = "http://24.40.70.14:8090/DAS010WSWAR"
def DTA_SERVICE_URL = "http://PACDCDTAAPP03:8090/dta/controller"

Then what I wanted was to use these globally in this one configuration file such as:

context.param.ServletURL = "${DAS_SERVICE_URL}/services/SERVICENOTIMPLEMENTED"
context.param.performDeviceRefreshBySerialNumber_ENDPOINT = "${DAS_SERVICE_URL}/services/ActivationService.ActivationServiceHttpSoap12Endpoint/"

Then to display them in my index.gsp like:
[DAS_SERVICE_URL]…[http://24.40.70.14:8090/DAS010WSWAR]

But found they where null in the gsp.
[DAS_SERVICE_URL]…[]

So I had to add a new value:

application{
    cfg_version = "10.4.2"
    version = "10.4.2"

    DASServiceUrl = DAS_SERVICE_URL
    DTAServiceUrl = DTA_SERVICE_URL

Then reference DASServiceUrl in my gsp

[DAS_SERVICE_URL]…[http://24.40.70.14:8090/DAS010WSWAR]

I never had any errors, just null names. Hope that helps…

Mick Knutson

Java, JavaEE, J2EE, WebLogic, WebSphere, JBoss, Tomcat, Oracle, Spring, Maven, Architecture, Design, Mentoring, Instructor and Agile Consulting. http://www.baselogic.com/blog/resume

View all posts

Java / JavaEE / Spring Boot Channel

BLiNC Supporters

BLiNC Adsense

Archives

Newsletter