<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<br>
<div class="moz-cite-prefix">On 6/12/15 5:22 PM, Wessel, Keith
wrote:<br>
</div>
<blockquote
cite="mid:A1EB7EC659FA0F429A55865D5820006D2E28ED42@CITESMBX1.ad.uillinois.edu"
type="cite">
<pre wrap="">I’m going to apologize in advance if this is a dumb question. I’m in the process of moving our login page from login.jsp in V2 into the spiffy new views in V3. I’ve worked with views a bit, but I’m no pro.
In our current setup, we display a rather inconspicuous note at the bottom of the login and error pages telling the user which IDP node they’re on. Helps us find login errors in the logs when they send us a screenshot. I used to do this by pulling in the system hostname and displaying it in my jsp code. Recently, I changed that to passing it to the jvm at start-up to give me more control over how it got displayed: -DidpNodeName=$node_hostname. It was nice either way because the IDP code could be the same on all cluster nodes and only the shell script was changed. It was in my .profile, so not even the tomcat start script had to differ.
Is there an easy way to pull something similar into the new login.vm?
</pre>
</blockquote>
<br>
<br>
I haven't tested yet, but I believe you could use the Spring
Environment instance that is exposed. The PropertySources installed
by default pull from both system properties and environment
variables.<br>
<br>
From the variables list at top of login.vm:<br>
<br>
<tt>## environment - Spring Environment object for property
resolution<br>
<br>
<br>
<br>
</tt>So you might just try something like:<br>
<br>
<tt>$environment.getProperty('idpNodeName')</tt><br>
<tt></tt><br>
<br>
<br>
<br>
</body>
</html>