showServerConfig.jsp revision d97b7ab26c446ed6c58b71c45249970c62f876f8
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync Copyright (c) 2008 Sun Microsystems Inc. All Rights Reserved
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync The contents of this file are subject to the terms
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync of the Common Development and Distribution License
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync (the License). You may not use this file except in
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync compliance with the License.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync You can obtain a copy of the License at
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync https://opensso.dev.java.net/public/CDDLv1.0.html or
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync See the License for the specific language governing
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync permission and limitations under the License.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync When distributing Covered Code, include this CDDL
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync Header Notice in each file and include the License file
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync If applicable, add the following below the CDDL Header,
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync with the fields enclosed by brackets [] replaced by
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync your own identifying information:
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync "Portions Copyrighted [year] [name of copyright owner]"
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync $Id: showServerConfig.jsp,v 1.11 2008/11/25 18:16:57 veiming Exp $
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync Portions copyright 2010-2015 ForgeRock AS.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync<%@ page import="com.iplanet.sso.SSOToken" %>
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync<%@ page import="com.sun.identity.common.configuration.ServerConfiguration" %>
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync<%@ page import="com.sun.identity.idm.IdConstants" %>
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync<%@ page import="com.sun.identity.sm.ServiceConfig" %>
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync<%@ page import="com.sun.identity.sm.ServiceConfigManager" %>
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync<%@ page import="java.io.File" %>
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync<%@ page import="java.net.URL" %>
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync<%@ page import="java.util.Properties" %>
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync<%@ page import="java.util.Set" %>
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync<%@ page import="java.util.StringTokenizer" %>
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync<%@ page import="java.util.Iterator" %>
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync<%@ page import="org.owasp.esapi.ESAPI"%>
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync <title>OpenAM</title>
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync <link rel="stylesheet" type="text/css" href="com_sun_web_ui/css/css_ns6up.css" />
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync <link rel="shortcut icon" href="com_sun_web_ui/images/favicon/favicon.ico" type="image/x-icon" />
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync<body class="DefBdy">
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync <div class="SkpMedGry1"><a href="#SkipAnchor3860"><img src="com_sun_web_ui/images/other/dot.gif" alt="Jump to End of Masthead" border="0" height="1" width="1" /></a></div><div class="MstDiv">
<div class="MstDivTtl"><img name="AMConfig.configurator.ProdName" src="com_sun_web_ui/images/PrimaryProductName.png" alt="OpenAM" border="0" /></div>
<table class="SkpMedGry1" border="0" cellpadding="5" cellspacing="0" width="100%"><tr><td><img src="com_sun_web_ui/images/other/dot.gif" alt="Jump to End of Masthead" border="0" height="1" width="1" /></a></td></tr></table>
<%@ include file="/WEB-INF/jsp/admincheck.jsp" %>
SSOToken ssoToken = requireAdminSSOToken(request, response, out, "showServerConfig.jsp");
String strURL = request.getRequestURL().toString();
out.println("<B>SYSTEM PROPERTIES</B>");
Properties propDef = ServerConfiguration.getDefaults(ssoToken);
out.println("<B>OpenAM Version</B>");
int port = url.getPort();
String protocol = url.getProtocol();
String host = url.getHost();
String path = url.getPath();
port = protocol.equals("https") ? 443 : 80;
path = path.substring(0, idx);
prop = ServerConfiguration.getServerInstance(ssoToken, protocol + "://" + host + ":" + port + path);
} catch (java.net.MalformedURLException e) {
out.println("<B>Server Name</B>");
out.println(ESAPI.encoder().encodeForHTML(prop.getProperty("com.iplanet.am.server.protocol").trim() + "://" +
out.println("<B>Container</B>");
out.println("<B>Operating System</B>");
out.println(" ");
out.println(" ");
out.println("<B>Java Version</B>");
out.println("<B>Browser Version</B>");
out.println("<B>Server Install Mode</B>");
out.println("Realm");
out.println("<B>Service Management Configuration Datastore Type</B>");
out.println("Embedded");
out.println("Remote");
out.println("<B>Java Home</B>");
out.println("<B>Server Names (Configuration->Sites and Servers)</B>");
out.println("<B>Configuration Directory</B>");
out.println("<B>User management datastore names under root realm (Datastore plugin type)</B>");
ServiceConfigManager scm = new ServiceConfigManager(IdConstants.REPO_SERVICE, ssoToken);
ServiceConfig svcfg = scm.getOrganizationConfig("/", null);
Set dsSet = svcfg.getSubConfigNames();
String dsname = (String)i.next();
ServiceConfig subConfig = svcfg.getSubConfig(dsname);
if (j == dsSet.size()) {
out.println("<B>Java Runtime Name</B>");
out.println("<B>Java VM Name</B>");
out.println("<B>Java VM Version</B>");
out.println("<B>Java Arch Data Model</B>");
out.println("<B>System Locale</B>");
out.println("<B>Java Classpath</B>");
while (st.hasMoreTokens()) {
String token = st.nextToken();
out.println("<B>Java VM Vendor</B>");
out.println("<br/>");
out.println("<a href=" + strURL + ">The data above is generated using the following url</a>");