Configurator.jsp revision b93185b577f7150fec37f9999b95b246d73bf63c
$Id: Configurator.jsp,v 1.10 2008/11/11 07:05:08 veiming Exp $
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
java.io.*,
String configTemplate = "/WEB-INF/classes/AMConfig.properties.template";
if (configF.exists()) {
+ "Click <a href=\"index.html\">here</a> to go to the console.";
props.load(new FileInputStream(configFile));
famProt = request.getParameter("famProt");
famHost = request.getParameter("famHost");
famPort = request.getParameter("famPort");
famDeploymenturi = request.getParameter("famDeploymenturi");
consoleProt = request.getParameter("consoleProt");
consoleHost = request.getParameter("consoleHost");
consolePort = request.getParameter("consolePort");
consoleDeploymenturi = request.getParameter("consoleDeploymenturi");
encPwd = request.getParameter("encPwd");
debugDir = request.getParameter("debugDir");
appUser = request.getParameter("appUser");
appPassword = request.getParameter("appPassword");
String submit = request.getParameter("submit");
String servletPath = request.getServletPath();
if ((famProt != null) && !famProt.equals("") &&
(famHost != null) && !famHost.equals("") &&
(famPort != null) && !famPort.equals("") &&
(famDeploymenturi != null) && !famDeploymenturi.equals("") &&
(consoleProt != null) && !consoleProt.equals("") &&
(consoleHost != null) && !consoleHost.equals("") &&
(consolePort != null) && !consolePort.equals("") &&
!consoleDeploymenturi.equals("") &&
(debugDir != null) && !debugDir.equals("") &&
(appUser != null) && !appUser.equals("") &&
(appPassword != null) && !appPassword.equals("")) {
if (encPwd.length() != 0) {
((ConfigurableKey) Crypt.getEncryptor()).setPassword(encPwd);
props.setProperty("SERVER_PROTOCOL", famProt);
props.setProperty("SERVER_HOST", famHost);
props.setProperty("SERVER_PORT", famPort);
props.setProperty("DEPLOY_URI", famDeploymenturi);
props.setProperty("CONSOLE_PROTOCOL", consoleProt);
props.setProperty("CONSOLE_HOST", consoleHost);
props.setProperty("CONSOLE_PORT", consolePort);
props.setProperty("CONSOLE_DEPLOY_URI", consoleDeploymenturi);
props.setProperty("CONSOLE_REMOTE", "true");
props.setProperty("DEBUG_DIR", debugDir);
props.setProperty("NAMING_URL", famProt + "://" + famHost + ":"
props.setProperty("NOTIFICATION_URL", consoleProt + "://"
props.setProperty("DEBUG_LEVEL", "error");
props.setProperty("APPLICATION_USER", appUser);
props.setProperty("ENCODED_APPLICATION_PASSWORD", (String)
AccessController.doPrivileged(new EncodeAction(appPassword)));
props.setProperty("APPLICATION_PASSWD", "");
props.setProperty("AM_COOKIE_NAME", "iPlanetDirectoryPro");
props.setProperty("ENCRYPTION_KEY", encPwd);
props.setProperty("ENCRYPTION_KEY_LOCAL", "");
props.setProperty("SESSION_PROVIDER_CLASS",
props.setProperty("CONFIGURATION_PROVIDER_CLASS",
props.setProperty("DATASTORE_PROVIDER_CLASS",
props.setProperty("CONFIG_DIR",
configurator.createAMConfigProperties(configFile,
configurator.setAMConfigProperties(configFile);
errorMsg = "Unable to create sample AMConfig.properties " +
"file: " + ioex.getMessage();
// get local protocol/host/port as default for this console
consoleProt = request.getScheme();
consoleHost = request.getServerName();
consolePort = "" + request.getServerPort();
String tmp = request.getRequestURI();
int secondSlash = tmp.indexOf("/", 1);
consoleDeploymenturi = tmp.substring(0, secondSlash);
<div class="MstDiv"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="MstTblTop" title="">
<div class="MstDivTtl"><img name="ProdName" src="console/images/PrimaryProductName.png" alt="" /></div></td><td class="MstTdLogo" width="1%"><img name="RMRealm.mhCommon.BrandLogo" src="com_sun_web_ui/images/other/javalogo.gif" alt="Java(TM) Logo" border="0" height="55" width="31" /></td></tr></tbody></table>
<table class="MstTblEnd" border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td><img name="RMRealm.mhCommon.EndorserLogo" src="com_sun_web_ui/images/masthead/masthead-sunname.gif" alt="Sun(TM) Microsystems, Inc." align="right" border="0" height="10" width="108" /></td></tr></tbody></table></div><div class="SkpMedGry1"><a name="SkipAnchor2089" id="SkipAnchor2089"></a></div>
<div class="SkpMedGry1"><a href="#SkipAnchor4928"><img src="com_sun_web_ui/images/other/dot.gif" alt="Jump Over Tab Navigation Area. Current Selection is: Access Control" border="0" height="1" width="1" /></a></div>
<form action="Configurator.jsp" method="POST"
Please provide the OpenAM Server Information. This is the server instance this remote administration console will be managing.
<td><input name="famProt" type="text" size="6" value="<%= famProt == null ? "" : ESAPI.encoder().encodeForHTML(famProt) %>" /></td>
<td><input name="famHost" type="text" size="30" value="<%= famHost == null ? "" : ESAPI.encoder().encodeForHTML(famHost) %>" /></td>
<td><input name="famPort" type="text" size="6" value="<%= famPort == null ? "" : ESAPI.encoder().encodeForHTML(famPort) %>" /></td>
<td><input name="famDeploymenturi" type="text" size="15" value="<%= famDeploymenturi == null ? "" : ESAPI.encoder().encodeForHTML(famDeploymenturi) %>" /></td>
<td><input name="encPwd" type="password" size="20" value="" /><br>The key must be the same as the Password Encryption Key set in the server instance. The Password Encryption Key of the server instance could be retrieved using ssoadm.jsp export-server option, enter the server instance and get the value of am.encryption.pwd attribute in the exported server configuration XML file.</td>
<td><input name="appUser" type="text" size="15" value="<%= appUser == null ? "" : ESAPI.encoder().encodeForHTML(appUser) %>" /></td>
<td><input name="consoleProt" type="text" size="6" value="<%= consoleProt == null ? "" : ESAPI.encoder().encodeForHTML(consoleProt) %>" /></td>
<td><input name="consoleHost" type="text" size="30" value="<%= consoleHost == null ? "" : ESAPI.encoder().encodeForHTML(consoleHost) %>" /></td>
<td><input name="consolePort" type="text" size="6" value="<%= consolePort == null ? "" : ESAPI.encoder().encodeForHTML(consolePort) %>" /></td>
<td><input name="consoleDeploymenturi" type="text" size="15" value="<%= consoleDeploymenturi == null ? "" : ESAPI.encoder().encodeForHTML(consoleDeploymenturi) %>" /></td>
<td><input name="debugDir" type="text" size="15" value="<%= debugDir == null ? "" : ESAPI.encoder().encodeForHTML(debugDir) %>" /></td>
AMConfig.properties created at <%= configFile %><br>
Click <a href="index.html">here</a> to go to the administration console.