<%--
 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://glassfish.dev.java.net/public/CDDLv1.0.html or
 glassfish/bootstrap/legal/CDDLv1.0.txt.
 See the License for the specific language governing 
 permissions and limitations under the License.
 
 When distributing Covered Code, include this CDDL 
 Header Notice in each file and include the License file 
 at glassfish/bootstrap/legal/CDDLv1.0.txt.  
 If applicable, add the following below the CDDL Header, 
 with the fields enclosed by brackets [] replaced by
 you own identifying information: 
 "Portions Copyrighted [year] [name of copyright owner]"
 
 Copyright 2006 Sun Microsystems, Inc. All rights reserved.
--%>

<%--
/**
 * ident "@(#)Version.jsp 1.6 03/09/04 SMI"
 */
--%>
<%@ page info="Version" language="java" contentType="text/html; charset=UTF-8" %>
<%@taglib uri="/jato.tld" prefix="jato" %>
<%@taglib uri="/cc.tld" prefix="cc" %>

<%@ page import="com.sun.web.ui.common.CCI18N" %>
<%@ page import="java.net.URLEncoder" %>
<%@ page import="com.iplanet.jato.util.NonSyncStringBuffer" %>

<%@ page import="com.sun.enterprise.tools.admingui.util.Util" %>

<%
    String productNameSrc = (request.getParameter("productNameSrc") != null)
	? request.getParameter("productNameSrc") : "";
    String versionFile = (request.getParameter("versionFile") != null)
	? request.getParameter("versionFile") : "";
    String versionTitle = Util.getMessage("com.sun.enterprise.tools.admingui.resources.Resources", "version.Title", null, request.getLocale());
    String versionMasthead = Util.getMessage("com.sun.enterprise.tools.admingui.resources.Resources", "version.mastHead", null, request.getLocale());
    String versionButton = Util.getMessage("com.sun.enterprise.tools.admingui.resources.Resources", "version.button", null, request.getLocale());
    String windowTitle = (request.getParameter("windowTitle") != null)
	? request.getParameter("windowTitle") : "";
    String productNameHeight =
	(request.getParameter("productNameHeight") != null)
        ? request.getParameter("productNameHeight") : "";
    String productNameWidth =
	(request.getParameter("productNameWidth") != null)
        ? request.getParameter("productNameWidth") : "";

    NonSyncStringBuffer buffer =
	new NonSyncStringBuffer("VersionMasthead.jsp?");

    String encoding = response.getCharacterEncoding() != null ?
	response.getCharacterEncoding() : CCI18N.UTF8_ENCODING;

    buffer.append("productNameSrc=")
	.append(URLEncoder.encode(productNameSrc, encoding))
	.append("&amp;versionFile=")
	.append(URLEncoder.encode(versionFile, encoding))
	.append("&amp;productNameHeight=")
        .append(URLEncoder.encode(productNameHeight, encoding))
        .append("&amp;productNameWidth=")
        .append(URLEncoder.encode(productNameWidth, encoding));
%>

<jato:useViewBean type="com.iplanet.jato.view.ViewBean" className="Version">

<html>
<head><title><%= versionTitle %></title></head>

<cc:i18nbundle id="bundle"
 baseName="com.sun.web.ui.resources.Resources"/>

<frameset rows="110,*,60" frameborder="no" border="0" framespacing="0" title= "<%= versionTitle%>" >
  <frame src="<%=buffer.toString() %>" name="topFrame" scrolling="no" noresize="noresize" id="topFrame" title="<%=versionMasthead%>">
  <frame src="<%=versionFile%>" name="mainFrame" scrolling="no" id="mainFrame" title="Content Frame">
  <frame src="../admingui/ButtonFrame" name="buttonFrame" scrolling="no" noresize="noresize" id="bottomFrame" title="<%=versionButton%>">
  <noframes>
    <body>
	<P>Frame Not Supported </P>
    </body>
  </noframes>
</frameset>

</html>

</jato:useViewBean>
