<%--
   DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.

   Copyright (c) 2009 Sun Microsystems Inc. All Rights Reserved

   The contents of this file are subject to the terms
   of the Common Development and Distribution License
   (the License). You may not use this file except in
   compliance with the License.

   You can obtain a copy of the License at
   https://opensso.dev.java.net/public/CDDLv1.0.html or
   opensso/legal/CDDLv1.0.txt
   See the License for the specific language governing
   permission and limitations under the License.

   When distributing Covered Code, include this CDDL
   Header Notice in each file and include the License file
   at opensso/legal/CDDLv1.0.txt.
   If applicable, add the following below the CDDL Header,
   with the fields enclosed by brackets [] replaced by
   your own identifying information:
   "Portions Copyrighted [year] [name of copyright owner]"

   $Id: Masthead.jsp,v 1.1 2009/08/05 20:15:51 veiming Exp $

   Portions Copyrighted 2016 ForgeRock AS.

--%>

<%@ page language="java" %>
<%@page import="com.sun.identity.console.version.VersionViewBean" %>
<%@ page import="org.owasp.esapi.ESAPI"%>

<%@taglib uri="/WEB-INF/tld/com_iplanet_jato/jato.tld" prefix="jato" %>
<%@taglib uri="/WEB-INF/tld/com_sun_web_ui/cc.tld" prefix="cc" %>

<%
    // obtain the versionFile and productSrc attrs from the request params 
    String versionFile = request.getParameter("versionFile") != null
	? request.getParameter("versionFile") : "";
    if (!ESAPI.validator().isValidInput("versionFile: " + versionFile, versionFile,
            "HTTPParameterValue", 2000, false)) {
        versionFile = "";
    }

    String productNameHeight =
	request.getParameter("productNameHeight") != null
        ? request.getParameter("productNameHeight") : "";
    if (!ESAPI.validator().isValidInput("productNameHeight: " + productNameHeight, productNameHeight,
            "HTTPParameterValue", 2000, false)) {
        productNameHeight = "";
    }

    String productNameWidth = request.getParameter("productNameWidth") != null
        ? request.getParameter("productNameWidth") : "";
    if (!ESAPI.validator().isValidInput("productNameWidth: " + productNameWidth, productNameWidth,
            "HTTPParameterValue", 2000, false)) {
        productNameWidth = "";
    }

    versionFile = VersionViewBean.validateVersionFile(
        request, versionFile);
%>

<jato:useViewBean className="com.sun.identity.console.version.MastheadViewBean">

<!-- Header -->
<cc:header name="Header"
 pageTitle=""
 styleClass="VrsMstBdy"
 baseName="com.sun.web.ui.resources.Resources"
 bundleID="testBundle">             
       
<cc:versionbanner versionFile="<%=versionFile%>" productNameSrc="<%=viewBean.getMastheadLogo()%>"
 productNameHeight="<%=productNameHeight%>" productNameWidth="<%=productNameWidth%>" />

</cc:header>

</jato:useViewBean>
