1 <%@ page import="java.net.URLEncoder"%>
2 <%@ page import="org.onap.portalsdk.core.util.SystemProperties"%>
4 // Requests are handled by class ProcessCspController in the EP-SDK-Core library.
5 // On login error, that controller returns a model that is a String->String map.
7 // CSP property is defined in fusion.properties file
8 final String cspLoginUrl = SystemProperties.getProperty(SystemProperties.CSP_LOGIN_URL);
9 // Name is defined by app; do not throw if missing
10 final String appDisplayName = SystemProperties.containsProperty(SystemProperties.APP_DISPLAY_NAME)
11 ? SystemProperties.getProperty(SystemProperties.APP_DISPLAY_NAME)
12 : SystemProperties.APP_DISPLAY_NAME;
13 // Build login-link URL using parameters and/or system properties
14 String returnUrl = request.getParameter("returnUrl");
15 if (returnUrl == null) {
16 final String cspPage = "doLogin";
17 if (SystemProperties.containsProperty(SystemProperties.APP_BASE_URL)) {
18 // Use property with the application URL; e.g., WebJunction
19 String appUrl = SystemProperties.getProperty(SystemProperties.APP_BASE_URL);
20 returnUrl = appUrl + (appUrl.endsWith("/") ? "" : "/") + cspPage;
22 // Use server info; incorrect for sites behind WebJunction.
23 returnUrl = (request.isSecure() ? "https://" : "http://") + request.getServerName() + ":"
24 + request.getServerPort() + request.getContextPath() + "/" + cspPage;
27 // Request has a parameter with the return URL
28 returnUrl = URLEncoder.encode(returnUrl, "UTF-8");
34 <meta charset="utf-8">
35 <meta http-equiv="X-UA-Compatible" content="IE=edge">
36 <meta name="viewport" content="width=device-width, initial-scale=1">
37 <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
40 font-family: Verdana, Arial, Helvetica, sans-serif;
91 <img src="static/fusion/images/logo_att_header.jpg" alt="Logo" />
94 <img src="static/fusion/images/ecomp-login-550x360.jpg" />
98 <a href="<%=cspLoginUrl%><%=returnUrl%>">Click here to login</a>
103 <div class="loginError">${model.error}</div>