|How to log application URL on startup? [message #1834394]
||Mon, 09 November 2020 16:15
| Daniel F.
Registered: November 2020
I've recently joined my company and we have a pretty large codebase in RAP which I've been studying and wrapping my head around.
I know that information like the context path, a fixed port etc. can be set and read in the launch configuration. On the surface the question is not necessarily about the port or hostname, but rather how I can run an initialization code which
- does not require an active user session (i.e. no UI thread)
- has access to Servlet information (Equinox Container, Jetty,..)
The conditions above are important, because as soon as there is an active user session, the information is easily accessible via the RWT class and is therefore trivial. Considering the Servlet information, I've tried to retrieve this in our own AbstractUIPlugin subclass' start() method by getting the EnvironmentInfo through BundleContext, however these (host, port) do not reside there.
Furthermore, I tried to solve this in various "filter" classes, but these either don't have access to those information at initialization time or are not even instantiated yet.
From a practical point of view, this is a minor thing. All I want for the sake of understanding and completeness that the console dynamically prints out the application URL after it has been started. Similarly how Spring Boot reports during startup where the application is listening on (without any browser/window open or active user sessions whatsoever).
Can maybe someone point me into the right direction? I suppose I would have to "inject" my code near where the Equinox Container is set up but I haven't been able to find any documentation or clues yet. Any help would be much appreciated.
Powered by FUDForum
. Page generated in 0.01482 seconds