WebSphere Portal V6.1登陸頁面修改

可以查看IBM/WebSphere/wp_profile/installedApps/[cellname]/PA_Login_Portlet_App.ear/login.war/WEB-INF/jsp目錄下的LoginView.jsp文件,這個就是login portlet的展現頁面了。因爲做了壓縮,所以代碼看着很亂,裏邊的註釋寫的也比較清楚,如<%--BEGING remember me greeting --%>,就是login portlet中記住個人信息代碼段的開始,<%-- END remember me greeting -->是結束。

我改的僅僅是把“取消”改成“PKI登陸”而己
首先在login.war/WEB-INF/classes/nls中修改資源文件,加入PKI登陸的unicode碼。
login.button.pkilogin=PKI\u767b\u5f55
然後修改LoginView.jsp,在<%-- BEGIN buttons section --%>後(也就是form表單的登錄按鈕部分)加入下面代碼:
<td nowrap>
 <input class="wpsButtonText" style="cursor:pointer;" type="submit" onclick="javascript:pkiLogin();return;" border="0" align="absmiddle" name="<portlet:namespace/>_pkilogin" value="<fmt:message key='login.button.pkilogin'/>"/>
</td>

<script>
function pkiLogin(){
  document.LoginForm.action="https://localhost/PortalPKI/login.action";
  document.LoginForm.submit;
}
</script>



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章