blob: da188b9c332fd8a5c9255fd00175df9601a50833 [file] [log] [blame]
<!--
Copyright (c) 2011, 2018 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
http://www.eclipse.org/legal/epl-2.0.
This Source Code may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the
Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
version 2 with the GNU Classpath Exception, which is available at
https://www.gnu.org/software/classpath/license.html.
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
<!initPage
setResourceBundle(key="i18n_web" bundle="org.glassfish.web.admingui.Strings");
setResourceBundle(key="help_web" bundle="org.glassfish.web.admingui.Helplinks");
/>
<!composition template="/templates/default.layout" guiTitle="$resource{i18n_web.configuration.httpListenerEditPageTitle}" >
<!define name="content">
<event>
<!beforeCreate
setSessionAttribute(key="listenerTabs" value="generalTab");
getRequestValue(key="configName" value=>$page{configName});
urlencode(value="#{pageSession.configName}" encoding="UTF-8" result="#{pageSession.encodedConfigName}");
getRequestValue(key="name" value="#{pageSession.Name}");
urlencode(value="#{pageSession.Name}" encoding="UTF-8" result="#{pageSession.encodedName}");
setPageSessionAttribute(key="prefix", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.encodedConfigName}/network-config");
gf.getEntityAttrs(endpoint="#{pageSession.prefix}/network-listeners/network-listener/#{pageSession.encodedName}" valueMap="#{pageSession.valueMap}");
setPageSessionAttribute(key="protocolName" value="#{pageSession.valueMap['protocol']}" );
setPageSessionAttribute(key="readOnly" value="#{false}" );
if("(#{pageSession.Name}=admin-listener)") {
//whether this is for DAS or other instance/cluster, we don't allow security to change for admin-listener.
setPageSessionAttribute(key="readOnly" value="#{true}" );
if ( "(#{pageSession.configName}=server-config)"){
setPageSessionAttribute(key="secHelpText" value="$resource{i18n_web.common.secureAdminHelp}");
}
if ( "(#{pageSession.protocolName}=pu-protocol)"){
setPageSessionAttribute(key="protocolName" value="sec-admin-listener" );
}
}
urlencode(value="#{pageSession.protocolName}" encoding="UTF-8" result="#{pageSession.encodedProtocolName}");
gf.getEntityAttrs(endpoint="#{pageSession.prefix}/protocols/protocol/#{pageSession.encodedProtocolName}" valueMap="#{pageSession.protocolMap}");
gf.getEntityAttrs(endpoint="#{pageSession.prefix}/protocols/protocol/#{pageSession.encodedProtocolName}/http" valueMap="#{pageSession.httpMap}");
setPageSessionAttribute(key="edit" value="#{true}" );
getRequestValue(key="cancelTo" value="#{pageSession.cancelTo}" default="httpListeners.jsf");
setPageSessionAttribute(key="listenerName" value="#{pageSession.Name}");
urlencode(value="#{pageSession.listenerName}" encoding="UTF-8" result="#{pageSession.encodedListenerName}");
setPageSessionAttribute(key="selfPage" value="#{request.contextPath}/web/configuration/httpListenerEdit.jsf?name=#{pageSession.encodedName}&configName=#{pageSession.configName}");
setSessionAttribute(key="secureCancelUrl" value="#{pageSession.selfPage}")
setPageSessionAttribute(key="cancelTo" value="web/configuration/httpListeners.jsf");
setSessionAttribute(key="httpListenerTabs" value="generalTab");
/>
</event>
" <script type="text/javascript">admingui.nav.selectTreeNodeById(admingui.nav.TREE_ID+":configurations:#{pageSession.encodedConfigName}:httpService:httpListeners:#{pageSession.encodedName}");</script>
<sun:form id="propertyForm">
#include "/web/configuration/httpListenerTabs.inc"
#include "/common/shared/alertMsg.inc"
<sun:title id="propertyContentPage" title="$resource{i18n_web.configuration.httpListenerEditPageTitle}" helpText="$resource{i18n_web.configuration.httpListenerEditPageTitleHelp}">
<!facet pageButtonsTop>
<sun:panelGroup id="topButtons">
<sun:button id="saveButton" text="$resource{i18n.button.Save}"
onClick="if (guiValidate('#{reqMsg}','#{reqInt}','#{reqPort}')) {submitAndDisable(this, '$resource{i18n.button.Processing}');}; return false;" >
<!command
if("#{pageSession.protocolMap['securityEnabled']}=#{null}") {
mapPut(map="#{pageSession.protocolMap}", key="securityEnabled", value="false");
}
gf.mapValueNullToFalse(map="#{pageSession.valueMap}" keys={"enabled", "jkEnabled"} result="#{requestScope.payload}");
prepareSuccessfulMsg();
gf.restRequest(endpoint="#{pageSession.prefix}/protocols/protocol/#{pageSession.encodedProtocolName}/http"
attrs="#{pageSession.httpMap}" method="POST" );
gf.restRequest(endpoint="#{pageSession.prefix}/protocols/protocol/#{pageSession.encodedProtocolName}"
attrs="#{pageSession.protocolMap}" method="POST" );
gf.restRequest(endpoint="#{pageSession.prefix}/network-listeners/network-listener/#{pageSession.encodedName}"
attrs="#{requestScope.payload}" method="POST" );
gf.redirect(page="#{pageSession.selfPage}&alertType=${alertType}&alertSummary=${alertSummary}&alertDetail=${alertDetail}");
/>
</sun:button>
<sun:button id="cancelButton" immediate="#{true}" primary="#{false}" text="$resource{i18n.button.Cancel}" >
<!command
gf.redirect(page="#{request.contextPath}/web/configuration/httpListeners.jsf?configName=#{configName}");
/>
</sun:button>
</sun:panelGroup>
</facet>
</sun:title>
#include "/web/configuration/httpListenerAttr.inc"
<sun:hidden id="helpKey" value="$resource{help_web.httpListenerEdit}" />
</sun:form>
</define>
</composition>