| <!-- |
| |
| Copyright (c) 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 |
| |
| --> |
| |
| <!-- grizzly/http.jsf --> |
| |
| |
| <!composition template="/templates/default.layout" guiTitle="$resource{i18n_web.grizzly.httpPageTitle}" > |
| <!define name="content"> |
| |
| <event> |
| <!beforeCreate |
| getRequestValue(key="configName" value=>$page{configName} default="server-config"); |
| getRequestValue(key="name" value="#{pageSession.Name}"); |
| getRequestValue(key="listenerName" value="#{pageSession.listenerName}" default=""); |
| setPageSessionAttribute(key="protocolName" value="#{pageSession.Name}"); |
| getRequestValue(key="cancelTo" value="#{pageSession.cancelTo}"); |
| urlencode(value="#{pageSession.Name}" encoding="UTF-8" result="#{pageSession.encodedName}"); |
| setPageSessionAttribute(key="encodedProtocolName" value="#{pageSession.encodedName}"); |
| urlencode(value="#{pageSession.listenerName}" encoding="UTF-8" result="#{pageSession.encodedListenerName}"); |
| |
| setPageSessionAttribute(key="parentPage", value="#{request.contextPath}/#{pageSession.cancelTo}") |
| setPageSessionAttribute(key="childType" value="http"); |
| setPageSessionAttribute(key="parentUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.configName}/network-config/protocols/protocol/#{pageSession.Name}"); |
| setPageSessionAttribute(key="selfUrl", value="#{pageSession.parentUrl}/#{pageSession.childType}"); |
| setPageSessionAttribute(key="rest-api" value="true"); |
| gf.checkIfEndPointExist(endpoint="#{pageSession.selfUrl}" exists="#{requestScope.exist}"); |
| setPageSessionAttribute(key="httpEndPointExist" value="#{requestScope.exist}"); |
| gf.getChildrenNamesList(endpoint="#{sessionScope.REST_URL}/configs/config/#{pageSession.configName}/http-service/virtual-server" result="#{pageSession.vsList}"); |
| if (#{pageSession.httpEndPointExist}){ |
| gf.getEntityAttrs(endpoint="#{pageSession.selfUrl}", valueMap="#{pageSession.httpMap}"); |
| setPageSessionAttribute(key="previousVSName" value="#{pageSession.httpMap['defaultVirtualServer']}" ); |
| setPageSessionAttribute(key="edit" value="#{true}" ); |
| } |
| if (! #{pageSession.httpEndPointExist}){ |
| setPageSessionAttribute(key="edit" value="#{false}" ) |
| gf.getDefaultValues(endpoint="#{pageSession.selfUrl}", valueMap="#{pageSession.httpMap}"); |
| mapPut(map="#{pageSession.httpMap}" key="defaultVirtualServer" value="server") |
| setPageSessionAttribute(key="previousVSName" value="" ); |
| } |
| |
| setPageSessionAttribute(key="valueMap" value="#{pageSession.httpMap}"); |
| setPageSessionAttribute(key="convertToFalseList" |
| value={"uploadTimeoutEnabled", "cometSupportEnabled", "dnsLookupEnabled", "rcmSupportEnabled", "traceEnabled", "authPassThroughEnabled", |
| "chunkingEnabled", "encodedSlashEnabled", "websocketsSupport", "xpoweredBy" }); |
| |
| //set the following for including buttons.inc |
| |
| setPageSessionAttribute(key="showDefaultButton" value="#{true}" ); |
| setPageSessionAttribute(key="showCancelButton" value="#{true}" ); |
| setPageSessionAttribute(key="hasPropertySheet" value="#{true}" ); |
| setPageSessionAttribute(key="hasPropertyTable" value="#{false}" ); |
| |
| setPageSessionAttribute(key="additionalSaveHandler" value="changeNetworkListenersInVS"); |
| /> |
| </event> |
| <sun:form id="propertyForm"> |
| |
| <!insert name="protocolTabs" /> |
| |
| #include "/common/shared/alertMsg.inc" |
| |
| <!-- Page Title --> |
| <sun:title id="propertyContentPage" title="$resource{i18n_web.grizzly.httpPageTitle}" helpText="$resource{i18n_web.grizzly.httpPageTitleHelp}"> |
| #include "/web/grizzly/httpSaveButtons.inc" |
| </sun:title> |
| <sun:propertySheet id="propertySheet"> |
| #include "/common/shared/configNameSection.inc" |
| #include "/web/grizzly/httpAttr.inc" |
| </sun:propertySheet> |
| "<br><br> |
| <sun:hidden id="helpKey" value="$resource{help_web.http}" /> |
| </sun:form> |
| </define> |
| </composition> |
| |
| |