I'm working on Hybris Version 5.4.0, and specifically on a Job exporting my datas. I would like the full external path (i.e. the URL) of my media to be exported instead of the relative path
Ex: /medias/sys_master/h76/hd6/8865465963102.jpg --> http://myserver:myport/medias/sys_master/h76/hd6/8865465963102.jpg
I've seen ways to do it in Hybris Wiki using static declarations in locale, but I would like to programatically do it, as my app could be run on various servers and environments.
I've already tried common ways to get server address in Java (for example using INet) but it didn't work.
Finally, I've seen that in HMC, the exact information I want is displayed at the end here :
Copyright (c) 2000-2013 hybris AG - hybris
Version: null
5.4.0.0
Last compile: 20180410 1543
Release date: 20141113 1921
Server: localhost:9101
Locale: English (United Kingdom) - en_GB
Timezone: Central European Time - Europe/Paris
but it's catching a servlet request in defaultContent_jsp.java (then out.print(request.getServerName()+":"+request.getServerPort());), do I have a way to spread this information to my Jobs ?