The Login page
With a text or HTML editor that supports JSP, you can customize the login.jsp file. The file is stored under the <App server specific folder>\sbm\bpmportal directory. The JSP code used to customize the Login page is provided in the following section.
Note: If you wish to customize the interface in the Business Process Server Home page, remember to include the path of the BPM Sign-on API servlet in your code.
JSP code for cutsomizing the login page
<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" %>
<%@ page errorPage="login_error.jsp" %>
<%@ page import="java.util.*" %>
<%@ page import="com.savvion.sbm.bizmanage.api.*" %>
<%@ page import="com.savvion.sbm.bpmportal.util.PortalConstants" %>
<%@ page import="com.savvion.sbm.bizmanage.pagegenerator.ServletTools" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ taglib uri="/bpmportal/tld/bpmportal.tld" prefix="sbm" %>
<jsp:useBean id="bizManage" class="com.savvion.sbm.bizmanage.api.BizManageBean" scope="session" />
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html >
<html xmlns="http://www.w3.org/1999/xhtml">
<%
String base = ServletTools.getBaseLocation(request);
bizManage.setRequest(request);
bizManage.setResponse(response);
bizManage.init(config.getServletContext());
String paramName = null;
String paramValue = null;
String targetURL = request.getParameter(PortalConstants.DOMAIN_TARGET_URL);
if (targetURL == null)
targetURL = "myhome/redirect";
targetURL = base + targetURL;
if ((targetURL.indexOf("?") > 0) && (targetURL.indexOf("=") > 0))
{ paramName = targetURL.substring(targetURL.indexOf("?")+1, targetURL.indexOf("="));
paramValue = targetURL.substring(targetURL.indexOf("=")+1);
} String requestFrom = (String) request.getAttribute(PortalConstants.REQUEST_FROM);
String errorMsg = request.getParameter(PortalConstants.BIZPASS_ERROR_MSG);
%>
<head>
<sbm:setLocale value="<%= bizManage.getLocale() %>" />
<sbm:setBundle basename="properties/bpmportal" scope="page" />
<title><sbm:message key="Login" /> - <sbm:message key="SBM" /></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<jsp:include page="common/include_css.jsp">
<jsp:param name="login" value="true" />
</jsp:include>
<script type="text/javascript" src="<%= base %>javascript/top.js"></script>
<!-- ExtJS LIBS -->
<script type="text/javascript" src="<%= base% >javascript/ext/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="<%= base %>javascript/ext/ext-all.js"></script>
<script type="text/javascript" src="<%= base %>javascript/bmencryptutils.js"></script>
<!-- ENDLIBS -->
<script language="javascript">
<!--
function checkformvals(theForm){
if(theForm.<%= PortalConstants.BIZPASS_USER_ID%>.value == ''){
alert("<sbm:message key="username" />");
return false;
} else {
var uIdTrimLen = trimString(theForm.<%= PortalConstants.BIZPASS_USER_ID%>.value).length;
var uIdLen = theForm.<%= PortalConstants.BIZPASS_USER_ID%>.value.length;
if (uIdTrimLen != uIdLen) {
alert("<sbm:message key="UserBlankSpaceValidation" />");
return false;
}
}
if(theForm.<%= PortalConstants.BIZPASS_USER_PASSWORD%>.value == ''){
alert("<sbm:message key="password" />");
return false;
}
return true;
}function setTime()
{ var today = new Date();
document.login.timeZone.value = today.getTimezoneOffset();
}function doEncrypt(){
var isPswrdEncrypted = document.getElementById("<%= PortalConstants.IS_PASSWORD_ENCRYPTED %>").value;
if(isPswrdEncrypted == "true"){
try{
var userEl = document.getElementById("txtBizPassUserID");
var pwdEl = document.getElementById("txtBizPassUserPassword");
pwdEl.value= Bm.BmEncryptUtils.encrypt(userEl.value,pwdEl.value,"<%= PortalConstants.DASH_SEPERATOR%>");
return true;
}catch(error){
throw error;
}
}
return true;
} //-->
</script>
</head>
<body onload="document.login.<%= ("".equals(bizManage.getName()) ? PortalConstants.BIZPASS_USER_ID : PortalConstants.BIZPASS_USER_PASSWORD) %>.focus();">
<%@ include file="common/include_body.jsp" %>
<div id="loginDiv" align="center" style="margin-top:125px"></div>
<div align="center" id="loginContent" >
<form name="login" action="<%= targetURL %>" method="post" onsubmit="return doEncrypt();">
<input type="hidden" id="<%= PortalConstants.IS_PASSWORD_ENCRYPTED %>" name="<%= PortalConstants.IS_PASSWORD_ENCRYPTED %>" value="true"/>
<input type="hidden" name="timeZone" value=""/>
<%= ((paramName != null && paramValue != null)?"<input type=\"hidden\" name=\""+paramName+"\" value=\""+paramValue+"\" />":"") %>
<table width="640" height="272" border="0" cellpadding="0" cellspacing="0" class="SbmLoginMainDiv" >
<tr>
<td width="320">
<table border="0" cellspacing="0" cellpadding="20">
<tr>
<td> </td>
<td> </td>
<td class="bpm-portal-logo-image_prog_savv"></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td height="35"> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td class="bpm-portal-logo-image_busimgr"></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td height="35"> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td class="bpm-portal-logo-image_progsw"></td>
</tr>
</table>
</td>
<td width="360" align="right">
<table width="91%" height="256" border="0" cellpadding="0" cellspacing="0">
<tr><td> </td> </tr>
<tr> <td> </td> </tr>
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
<td colspan="2" height="30" align="left" class="SbmInfoMessage" >
<%
if(PortalConstants.LOGOUT.equals(requestFrom)) {
%>
<sbm:message key="logoutMessage1" /><br><sbm:message key="logoutMessage2" />
<% } else if(PortalConstants.LOGIN_ERROR.equals(requestFrom)) {
if(request.getParameter(PortalConstants.BIZPASS_ERROR_MSG).contains("BM_PW16100")){%>
<sbm:message key="InvalidUserNameAlert" />
<% } else { %>
<%=errorMsg%>
<%
}
} else if(PortalConstants.XSRF.equals(requestFrom)){ %>
<sbm:message key="XSRFAttackObserved" />
<% } else { %>
<sbm:message key="EnterLogin" />
<% } %>
</td>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
<td width="56%" nowrap="nowrap">
<div align="right"><span class="bpm-portal-login-text"><label for="txtBizPassUserID"><sbm:message key="username" /></label></span>
<input type="text" name="<%= PortalConstants.BIZPASS_USER_ID %>" value="<%= bizManage.getName() %>" id="txtBizPassUserID" onFocus="setTime()" class="InptTxt" size="32" maxlength="255" tabindex="1">
</div>
</td>
<td> </td>
</tr>
<tr>
<td> </td>
<td height="43" nowrap="nowrap">
<div align="right"><span class="bpm-portal-login-text"><label for="txtBizPassUserPassword"><sbm:message key="password" /></label></span>
<input type="password" name="<%= PortalConstants.BIZPASS_USER_PASSWORD %>" id="txtBizPassUserPassword" onFocus="setTime()" class="InptTxt" size="32" maxlength="255" tabindex="2">
</div>
</td>
<td> </td>
</tr>
<tr>
<td> </td>
<td calign="right" class="SBMButton" nowrap="nowrap" height="30">
<div align="right"> <input type="submit" name="login" class="ResultBtn" tabindex="3" onMouseOver="this.className='ResultBtnHover';" onMouseOut="this.className='ResultBtn';" onClick="return checkformvals(document.login);" value="<sbm:message key="Login" />" /></div>
</td>
<td> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table>
<tr>
<td align="left" width="100%" valign="bottom">
div class="bpm-portal-login-footer"><sbm:message key="copyrightMessage" /></div>
</td>
<td align="right" valign="top">
<div><a href="javascript:goToSupportFromLogin()" tabindex="3"><span class="bpm-portal-login-footer"><sbm:message key="support" /></span></a></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</div>
</body>
</html>
<% session.invalidate(); %>