How can i get tomcat random port used by studio ?
Those technical details should not leak in your applicative code. Try to use a process parameter to store your host path. It might be
localhost:8080 at dev time and then become something like
www.my-company.com in production. So using a parameter in your app seems more flexible.
If you want to reset the port to 8080 in the Studio, you can edit the port in the Server preference. (be sure that is port is available otherwise it will be replaced with a free port).
You could use some tomcat specific code to retrieve it but I do not advise it.
<p>I agree with your advice.</p>
<p>when deploying using BCD, it's easy to get this information from the BCD deploy json status file, and then update my process parameter using BCD extract/merge conf feature. This works as expected for my Qualification environment</p>
<p>The issue is only on studio with dev, since my e2e test can't verify a mail has been send with the expected content, since my "serveur Url" process parameter is localhost:8080, but should be updated with real port, and as you mentioned, if 8080 is already in use, a random port is used<br />