Architecting, installing and maintaining your SAS environment

customizing a logon frontend to identify what app server is being used.

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 77
Accepted Solution

customizing a logon frontend to identify what app server is being used.

was trying to use this link to customize a page

SAS(R) 9.4 Intelligence Platform: Middle-Tier Administration Guide, Second Edition

what i would like to do is use some JSP code to identify what WebAppServer  and what MetaDataServer  I am using

to this end i modifed the D:\SASHome\SASWebInfrastructurePlatform\9.4\Static\wars\sas.svcs.logon\WEB-INF\view\jsp\default\ui\logon_custom.jsp

hoping that the environment variables might reveal something but after a build of the wip service and a deployment on all 3 nodes I still see nothing on the

logon page . i went in prior to the deployment and enable the customization in SASS Manager  , I assume this just flags to include the logon_custom.jsp.

any ideas how I can get this to work I still have a login page with no additional information

<%--

    This JSP file is included as part of the logon.jsp if a site

    has enabled the custom logon page message policy. The tags

    below are provided as a simple convenience for those sites

    that want to simply provide an embedded text message. These

    tags can be modified or removed if additional customization

    is required.

--%>

<p>

        

<%

   java.util.Enumeration e = System.getProperties().propertyNames();

   while( e.hasMoreElements() ){

    String prop = (String)e.nextElement();

    out.print(prop);

    out.print(" = ");

    out.print( System.getProperty(prop) );

    out.print("<br>");

   }

%>

</p>


Accepted Solutions
Solution
‎11-17-2015 11:34 AM
Frequent Contributor
Posts: 77

Re: customizing a logon frontend to identify what app server is being used.

to some extent yes that was the goal . In the interrum I ran across ways to embedd JSP and jquery into the logon_custom.jsp and get information and do some cooll coding. Our experiment with a cluster was a utter failure due to a plan file that did mnot work ...we had to pay the SAS consultant more to actually create one again . Anyway at that point we said ^&^% it and went with stand alone servers.

View solution in original post


All Replies
SAS Employee
Posts: 18

Re: customizing a logon frontend to identify what app server is being used.

Hi robm,

 

Found your question interesting.

 

What is it you are utlimately trying to achieve i.e. why do you need to identify what app server is being used? Are you trying to determine the level of load balancing across 2 or more instances of the same web app server?

 

Cheers, Simon

 

 

 

Solution
‎11-17-2015 11:34 AM
Frequent Contributor
Posts: 77

Re: customizing a logon frontend to identify what app server is being used.

to some extent yes that was the goal . In the interrum I ran across ways to embedd JSP and jquery into the logon_custom.jsp and get information and do some cooll coding. Our experiment with a cluster was a utter failure due to a plan file that did mnot work ...we had to pay the SAS consultant more to actually create one again . Anyway at that point we said ^&^% it and went with stand alone servers.

SAS Employee
Posts: 18

Re: customizing a logon frontend to identify what app server is being used.

Hi robm,

 

Sounds like you have come to a conclusion but for future reference there are some built in-tools you can use with SAS 9.4:

 

  • SAS Web Administration Console;
  • Load Balancer interface;

 

See: SAS 9.4 Intelligence Platform: Middle-Tier Administration Guide, Third Edition

 

 

SAS Web Administration Console: 

 

  • monitoring information about users who are currently logged on to SAS web applications;
  • viewing audit reports that show user logon and logoff activity and failed logon attempts
  • performing server maintenance, as a part of system maintenance
  • updating the Job Execution Service configuration on page 78
  • managing notification templates and letterheads
  • managing authorization, including Web Infrastructure Platform roles and privileges and web-layer permissions
  • viewing the current configuration for web applications that have been deployed at your site

 

 

 

Load Balancer interface:

 

  • sessions are assigned to a given instance of a SAS Web Application Server;
  • Allows an administrator to drain sessions to prevent new users logging on;

 

 

--Simon

 

Frequent Contributor
Posts: 77

Re: customizing a logon frontend to identify what app server is being used.

well not to get what metadata server I was using, however 

 

 

D:\SASConfig\Lev1\Web\WebAppServer\SASServer1_1\sas_webapps\sas.svcs.logon.war\WEB-INF\view\jsp\default\ui

 

 

if you have custom logon and custom logout enabled 

 

Application management>SAS Aplication Infrastructure>Properties>Settings 

 

say yes to Display Custome logon message

 

then in logon_customer.jsp you can write some JSP code to spit out env vars

 

<%
   java.util.Enumeration e = System.getProperties().propertyNames();
   while( e.hasMoreElements() ){
   	String prop = (String)e.nextElement();
   	out.print(prop);
   	out.print(" = ");
   	out.print( System.getProperty(prop) );
   	out.print("<br>");
   }
%>

 

 

 

you can t include stuff like 

<%@ page import="java.util.*" %>


 

 

as well you can insert jQUERY to do things like in this case redirect a bad URL someone has cached:

we have users that have links from 9.3ebi on there desktop instead of an error this redirects them to the login page and they can go find their new link

 

 

<%--
This JSP file is included as part of the logon.jsp if a site
has enabled the custom logon page message policy. The tags
below are provided as a simple convenience for those sites
that want to simply provide an embedded text message. These
tags can be modified or removed if additional customization
is required.
--%>
<p>
<%-- custom content goes here --%>


<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/base/jquery-ui.css" type="text/css" media="all" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js" type="text/javascript"></script>

<script type="text/javascript" language="javascript">
var theUrl = $(location).attr('href');
var isFound = theUrl.toLowerCase().indexOf("_sasapp=information+delivery+portal+4.3&");
if (isFound > 0)
{
var res = theUrl.split('?');
theUrl = res[0];
$('#custom-logon-message').append('<font color=red><h2>' + theUrl + ' </h2></font><br>' )
$('#fm1').attr('action', '/SASLogon/login');
$('#fm1').get(0).setAttribute('action', '/SASPortal');
var actionis = $( '#fm1' ).attr( 'action' );
$('#custom-logon-message').append('<br><font color=red><h2>' + actionis + ' </h2></font><br>' )
theUrl = theUrl.replace('/SASLogon/login','/SASPortal')
window.location.replace(theUrl);
}

</script>


</p>

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 678 views
  • 0 likes
  • 2 in conversation