在OAM 11g中配置使用客户化登录页面
五月 5, 2012 in Oracle 融合中间件
概述
在身份管理和单点登录项目实施过程中,标准的OAM 11g提供的登录页面往往不能直接满足需求,一般情况下都需要客户化开发和配置登录页面作为单点登录的统一入口,本文主要介绍了如何在OAM 11g中配置实用客户化登录页面。
实现
1、开发login.jsp页面,样例代码如下:
<%@page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.
getServerPort()+path+"/";
String reqId = request.getParameter("request_id");
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'index.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
</head>
<body>
Custom Login JSP<br>
<form action="http://oamservername:oamport/oam/server/auth_cred_submit" method="post">
<table border=0>
<tr>
<td>Login</td>
<td><input type="text" name="username"></td>
</tr>
<tr>
<td>Password</td>
<td><input type="text" name="password"></td>
</tr>
<tr>
<td></td>
<td><input type="hidden" name="request_id" value="<%=reqId%>"></td>
</tr>
<tr>
<td><input type="submit"></td>
<td> </td>
</tr>
</table>
</form>
</body>
</html>