diff --git a/appserver/admingui/common/src/main/java/org/glassfish/admingui/common/handlers/CommonHandlers.java b/appserver/admingui/common/src/main/java/org/glassfish/admingui/common/handlers/CommonHandlers.java index 932adcf1cab..711aa3e0d2c 100644 --- a/appserver/admingui/common/src/main/java/org/glassfish/admingui/common/handlers/CommonHandlers.java +++ b/appserver/admingui/common/src/main/java/org/glassfish/admingui/common/handlers/CommonHandlers.java @@ -448,10 +448,12 @@ public static void removeEmptyProps(HandlerContext handlerCtx) { *

This method will "html escape" any <, >, or & characters * that appear in a String from the QUERY_STRING. This is to help * prevent XSS vulnerabilities.

+ *

orig without escape is available, but be very cautious when using it. * *

Input value: "key" -- Type: String

* *

Output value: "value" -- Type: String

+ *

Output value: "orig" -- Type: String

* */ @Handler(id="getRequestValue", @@ -459,12 +461,14 @@ public static void removeEmptyProps(HandlerContext handlerCtx) { @HandlerInput(name="key", type=String.class, required=true), @HandlerInput(name="default", type=String.class)}, output={ - @HandlerOutput(name="value", type=Object.class)} + @HandlerOutput(name="value", type=Object.class), + @HandlerOutput(name="orig", type=Object.class)} ) public static void getRequestValue(HandlerContext handlerCtx) { String key = (String) handlerCtx.getInputValue("key"); Object defaultValue = handlerCtx.getInputValue("default"); Object value = handlerCtx.getFacesContext().getExternalContext().getRequestParameterMap().get(key); + Object orig = value; if ((value == null) || "".equals(value)) { value = handlerCtx.getFacesContext().getExternalContext().getRequestMap().get(key); if ((value == null) && (defaultValue != null)){ @@ -480,6 +484,7 @@ public static void getRequestValue(HandlerContext handlerCtx) { value = Util.htmlEscape((String) value); } handlerCtx.setOutputValue("value", value); + handlerCtx.setOutputValue("orig", orig); } /** diff --git a/appserver/admingui/common/src/main/resources/appServer/pswdAliasAttr.inc b/appserver/admingui/common/src/main/resources/appServer/pswdAliasAttr.inc index 3de039f09e0..7c39eeeab94 100644 --- a/appserver/admingui/common/src/main/resources/appServer/pswdAliasAttr.inc +++ b/appserver/admingui/common/src/main/resources/appServer/pswdAliasAttr.inc @@ -40,16 +40,16 @@ --> - - + + - + - + @@ -67,6 +67,6 @@ - + diff --git a/appserver/admingui/common/src/main/resources/appServer/pswdAliasEdit.jsf b/appserver/admingui/common/src/main/resources/appServer/pswdAliasEdit.jsf index 416c1e0719d..6bd743371db 100644 --- a/appserver/admingui/common/src/main/resources/appServer/pswdAliasEdit.jsf +++ b/appserver/admingui/common/src/main/resources/appServer/pswdAliasEdit.jsf @@ -50,9 +50,9 @@ diff --git a/appserver/admingui/common/src/main/resources/applications/lifecycleEdit.jsf b/appserver/admingui/common/src/main/resources/applications/lifecycleEdit.jsf index 6a5455ffcfa..9f704b6724f 100644 --- a/appserver/admingui/common/src/main/resources/applications/lifecycleEdit.jsf +++ b/appserver/admingui/common/src/main/resources/applications/lifecycleEdit.jsf @@ -2,7 +2,7 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2009-2011 Oracle and/or its affiliates. All rights reserved. The contents of this file are subject to the terms of either the GNU General Public License Version 2 only ("GPL") or the Common Development @@ -47,7 +47,7 @@ setResourceBundle(key="help_common" bundle="org.glassfish.common.admingui.Helplinks"); /> diff --git a/appserver/admingui/common/src/main/resources/security/auditModules/auditModules.jsf b/appserver/admingui/common/src/main/resources/security/auditModules/auditModules.jsf index afe277a990d..051437c5b45 100644 --- a/appserver/admingui/common/src/main/resources/security/auditModules/auditModules.jsf +++ b/appserver/admingui/common/src/main/resources/security/auditModules/auditModules.jsf @@ -46,12 +46,13 @@ /> $page{configName} default="server-config"); + getRequestValue(key="configName" value=>$page{configName} ); + urlencode(value="#{pageSession.configName}" encoding="UTF-8" result="#{pageSession.encodedConfigName}"); setPageSessionAttribute(key="childType" value="audit-module"); setPageSessionAttribute(key="parentUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.configName}/security-service"); setPageSessionAttribute(key="selfUrl", value="#{pageSession.parentUrl}/audit-module"); @@ -66,7 +67,7 @@ setPageSessionAttribute(key="tableTitle" value="$resource{i18nc.auditModule.TableTitle}"); /> -" +" #include "/common/shared/alertMsg.inc" diff --git a/appserver/admingui/common/src/main/resources/security/jacc/jaccProviders.jsf b/appserver/admingui/common/src/main/resources/security/jacc/jaccProviders.jsf index 82c7ba5ce94..fc0d0909a42 100644 --- a/appserver/admingui/common/src/main/resources/security/jacc/jaccProviders.jsf +++ b/appserver/admingui/common/src/main/resources/security/jacc/jaccProviders.jsf @@ -49,12 +49,14 @@ /> $page{configName} default="server-config"); + getRequestValue(key="configName" value=>$page{configName} ); + urlencode(value="#{pageSession.configName}" encoding="UTF-8" result="#{pageSession.encodedConfigName}"); + htmlEscape(value="#{pageSession.configName}" result="#{pageSession.escapedConfigName}"); setPageSessionAttribute(key="childType" value="jacc-provider"); setPageSessionAttribute(key="parentUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.configName}/security-service"); setPageSessionAttribute(key="selfUrl", value="#{pageSession.parentUrl}/#{pageSession.childType}"); @@ -69,7 +71,7 @@ setPageSessionAttribute(key="tableTitle" value="$resource{i18nc.jacc.TableTitle}"); /> -" +" #include "/common/shared/alertMsg.inc" $page{configName} default="server-config"); + getRequestValue(key="configName" value=>$page{configName}); + urlencode(value="#{pageSession.configName}" encoding="UTF-8" result="#{pageSession.encodedConfigName}"); setPageSessionAttribute(key="childType" value="message-security-config"); setPageSessionAttribute(key="parentUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.configName}/security-service"); setPageSessionAttribute(key="selfUrl", value="#{pageSession.parentUrl}/#{pageSession.childType}"); @@ -70,7 +71,7 @@ } /> -" +" #include "/common/shared/alertMsg.inc" diff --git a/appserver/admingui/common/src/main/resources/security/realms/realms.jsf b/appserver/admingui/common/src/main/resources/security/realms/realms.jsf index dd599673982..73701d777ab 100644 --- a/appserver/admingui/common/src/main/resources/security/realms/realms.jsf +++ b/appserver/admingui/common/src/main/resources/security/realms/realms.jsf @@ -46,11 +46,13 @@ /> + guiTemplateOnLoad="admingui.nav.refreshTree('treeForm:tree:configurations:#{pageSession.encodedConfigName}:security:realms');" + > $page{configName} default="server-config"); + getRequestValue(key="configName" value=>$page{configName}); + urlencode(value="#{pageSession.name}" encoding="UTF-8" result=>$page{encodedConfigName}); setPageSessionAttribute(key="childType" value="auth-realm"); setPageSessionAttribute(key="parentUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.configName}/security-service"); setPageSessionAttribute(key="selfUrl", value="#{pageSession.parentUrl}/#{pageSession.childType}"); @@ -65,7 +67,7 @@ setPageSessionAttribute(key="tableTitle" value="$resource{i18nc.realm.TableTitle}"); /> -" +" #include "/common/shared/alertMsg.inc" @@ -53,8 +54,14 @@ setPageSessionAttribute(key="listOfAliases" value={}); if( "!(#{requestScope._listOfMap} = #{null})" ){ foreach(var="oneChildMap" list="#{requestScope._listOfMap}"){ + if ("#{requestScope.doEscape}"){ + htmlEscape(value="#{requestScope.oneChildMap.message}" result="#{requestScope.encodedAliasName}"); + listAdd(list="#{pageSession.listOfAliases}" value="#{requestScope.encodedAliasName}" ); + } + if ("!#{requestScope.doEscape}"){ listAdd(list="#{pageSession.listOfAliases}" value="#{requestScope.oneChildMap.message}" ); } + } gf.listSort(list="#{pageSession.listOfAliases}"); } diff --git a/appserver/admingui/jms-plugin/src/main/resources/jmsHosts.jsf b/appserver/admingui/jms-plugin/src/main/resources/jmsHosts.jsf index 76669b8142a..f006455d1cc 100644 --- a/appserver/admingui/jms-plugin/src/main/resources/jmsHosts.jsf +++ b/appserver/admingui/jms-plugin/src/main/resources/jmsHosts.jsf @@ -2,7 +2,7 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. + Copyright (c) 1997-2011 Oracle and/or its affiliates. All rights reserved. The contents of this file are subject to the terms of either the GNU General Public License Version 2 only ("GPL") or the Common Development @@ -47,14 +47,14 @@ + guiTemplateOnLoad="admingui.nav.refreshTree('treeForm:tree:configurations:#{pageSession.encodedConfigName}:jmsConfiguration:jmsHosts');"> $page{configName}); - + urlencode(value="#{pageSession.configName}" encoding="UTF-8" result="#{pageSession.encodedConfigName}"); setPageSessionAttribute(key="childType" value="jms-host"); - setPageSessionAttribute(key="parentUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.configName}/jms-service"); + setPageSessionAttribute(key="parentUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.encodedConfigName}/jms-service"); setPageSessionAttribute(key="selfUrl", value="#{pageSession.parentUrl}/#{pageSession.childType}"); setPageSessionAttribute(key="rest-api" value="true"); gf.getChildList(parentEndpoint="#{pageSession.parentUrl}", childType="#{pageSession.childType}", result="#{requestScope.listOfRows}"); @@ -79,7 +79,7 @@ } /> -" +" #include "/common/shared/alertMsg.inc" diff --git a/appserver/admingui/web/src/main/resources/configuration/httpListenerEdit.jsf b/appserver/admingui/web/src/main/resources/configuration/httpListenerEdit.jsf index 1bc6f962257..989e0b3a62d 100644 --- a/appserver/admingui/web/src/main/resources/configuration/httpListenerEdit.jsf +++ b/appserver/admingui/web/src/main/resources/configuration/httpListenerEdit.jsf @@ -50,10 +50,11 @@ $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.configName}/network-config"); + 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}"); @@ -81,7 +82,7 @@ setSessionAttribute(key="secureCancelUrl" value="#{pageSession.selfPage}") /> -" +" #include "/common/shared/alertMsg.inc" diff --git a/appserver/admingui/web/src/main/resources/configuration/httpListeners.jsf b/appserver/admingui/web/src/main/resources/configuration/httpListeners.jsf index 9c2193abe9e..efccb8c1da0 100644 --- a/appserver/admingui/web/src/main/resources/configuration/httpListeners.jsf +++ b/appserver/admingui/web/src/main/resources/configuration/httpListeners.jsf @@ -48,9 +48,9 @@ $attribute{selectedRows}); foreach (var="row" list="${selectedRows}") { setPageSessionAttribute(key="networkListenerName" value="#{row['name']}"); - setPageSessionAttribute(key="networkListenerUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.configName}/network-config/network-listeners/network-listener"); + setPageSessionAttribute(key="networkListenerUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.encodedConfigName}/network-config/network-listeners/network-listener"); gf.restRequest(endpoint="#{pageSession.networkListenerUrl}/#{pageSession.networkListenerName}", method="get", result="#{pageSession.networkListAttrs}"); setPageSessionAttribute(key="protocolName" value="#{pageSession.networkListAttrs.data.extraProperties.entity['protocol']}"); - setPageSessionAttribute(key="protocolUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.configName}/network-config/protocols/protocol/#{pageSession.protocolName}"); - setPageSessionAttribute(key="protocolHttpUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.configName}/network-config/protocols/protocol/#{pageSession.protocolName}/http"); - setPageSessionAttribute(key="virtualServerUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.configName}/http-service/virtual-server"); + setPageSessionAttribute(key="protocolUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.encodedConfigName}/network-config/protocols/protocol/#{pageSession.protocolName}"); + setPageSessionAttribute(key="protocolHttpUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.encodedConfigName}/network-config/protocols/protocol/#{pageSession.protocolName}/http"); + setPageSessionAttribute(key="virtualServerUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.encodedConfigName}/http-service/virtual-server"); gf.checkIfEndPointExist(endpoint="#{pageSession.protocolHttpUrl}", exists="#{pageSession.protocolHttpExist}"); // check if there is no listener exists for this protocol and it was created by GUI, then delete gf.getChildrenNamesList(endpoint="#{pageSession.networkListenerUrl}", id="name", result="#{pageSession.networkListeners}"); @@ -103,9 +103,10 @@ $page{configName} default="server-config"); + getRequestValue(key="configName" value=>$page{configName} ); + urlencode(value="#{pageSession.configName}" encoding="UTF-8" result="#{pageSession.encodedConfigName}"); setPageSessionAttribute(key="childType" value="network-listener"); - setPageSessionAttribute(key="parentUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.configName}/network-config/network-listeners"); + setPageSessionAttribute(key="parentUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.encodedConfigName}/network-config/network-listeners"); setPageSessionAttribute(key="selfUrl", value="#{pageSession.parentUrl}/#{pageSession.childType}"); setPageSessionAttribute(key="rest-api" value="true"); @@ -119,7 +120,7 @@ setPageSessionAttribute(key="tableTitle" value="$resource{i18n_web.grizzly.networkListeners.tableName}"); /> -" +" #include "/common/shared/alertMsg.inc" $page{configName} default="server-config"); + getRequestValue(key="configName" value=>$page{configName} ); + urlencode(value="#{pageSession.configName}" encoding="UTF-8" result="#{pageSession.encodedConfigName}"); setPageSessionAttribute(key="childType" value="thread-pool"); - setPageSessionAttribute(key="parentUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.configName}/thread-pools"); + setPageSessionAttribute(key="parentUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.encodedConfigName}/thread-pools"); setPageSessionAttribute(key="selfUrl", value="#{pageSession.parentUrl}/#{pageSession.childType}"); setPageSessionAttribute(key="rest-api" value="true"); gf.getChildList(parentEndpoint="#{pageSession.parentUrl}", childType="#{pageSession.childType}", result="#{requestScope.listOfRows}"); @@ -71,7 +72,7 @@ setPageSessionAttribute(key="tableTitle" value="$resource{i18n_web.configuration.threadPool.tableName}"); /> -" +" #include "/common/shared/alertMsg.inc" $page{configName} default="server-config"); + getRequestValue(key="configName" value=>$page{configName} ); + urlencode(value="#{pageSession.configName}" encoding="UTF-8" result="#{pageSession.encodedConfigName}"); setPageSessionAttribute(key="childType" value="virtual-server"); - setPageSessionAttribute(key="parentUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.configName}/http-service"); + setPageSessionAttribute(key="parentUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.encodedConfigName}/http-service"); setPageSessionAttribute(key="selfUrl", value="#{pageSession.parentUrl}/#{pageSession.childType}"); setPageSessionAttribute(key="rest-api" value="true"); gf.getChildList(parentEndpoint="#{pageSession.parentUrl}", childType="#{pageSession.childType}", id="id", result="#{requestScope.listOfRows}"); @@ -72,7 +73,7 @@ setPageSessionAttribute(key="additionalDeleteHandlerArgs" value=""); /> -" +" #include "/common/shared/alertMsg.inc" diff --git a/appserver/admingui/web/src/main/resources/grizzly/networkListenerEdit.jsf b/appserver/admingui/web/src/main/resources/grizzly/networkListenerEdit.jsf index e3e0ee48f51..b89083d8e2a 100644 --- a/appserver/admingui/web/src/main/resources/grizzly/networkListenerEdit.jsf +++ b/appserver/admingui/web/src/main/resources/grizzly/networkListenerEdit.jsf @@ -52,16 +52,17 @@ $page{configName} default="server-config"); + 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}"); - getRequestValue(key="cancelTo" value="#{pageSession.cancelTo}" default="networkListeners.jsf"); + getRequestValue(key="cancelTo" value="#{pageSession.cancelTo}" default="web/grizzly/networkListeners.jsf"); setPageSessionAttribute(key="listenerName" value="#{pageSession.Name}"); urlencode(value="#{pageSession.listenerName}" encoding="UTF-8" result="#{pageSession.encodedListenerName}"); setPageSessionAttribute(key="selfPage" value="#{request.contextPath}/web/grizzly/networkListenerEdit.jsf?name=#{pageSession.encodedName}&cancelTo=#{pageSession.cancelTo}&configName=#{pageSession.configName}"); - setPageSessionAttribute(key="parentPage" value="#{request.contextPath}/web/grizzly/#{pageSession.cancelTo}"); + setPageSessionAttribute(key="parentPage" value="#{request.contextPath}/#{pageSession.cancelTo}"); setPageSessionAttribute(key="childType" value="network-listener"); - setPageSessionAttribute(key="parentUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.configName}/network-config/network-listeners"); + setPageSessionAttribute(key="parentUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.encodedConfigName}/network-config/network-listeners"); setPageSessionAttribute(key="selfUrl", value="#{pageSession.parentUrl}/#{pageSession.childType}/#{pageSession.Name}"); setPageSessionAttribute(key="rest-api" value="true"); gf.getEntityAttrs(endpoint="#{pageSession.selfUrl}", valueMap="#{pageSession.valueMap}"); @@ -71,7 +72,7 @@ } setPageSessionAttribute(key="convertToFalseList" value={"enabled", "jkEnabled"}); urlencode(value="#{pageSession.protocolName}" encoding="UTF-8" result="#{pageSession.encodedProtocolName}"); - setPageSessionAttribute(key="parentUrl2", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.configName}/network-config/protocols"); + setPageSessionAttribute(key="parentUrl2", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.encodedConfigName}/network-config/protocols"); setPageSessionAttribute(key="childType2" value="protocol"); setPageSessionAttribute(key="selfUrl2", value="#{pageSession.parentUrl2}/#{pageSession.childType2}/#{pageSession.encodedProtocolName}"); gf.getEntityAttrs(endpoint="#{pageSession.selfUrl2}", valueMap="#{pageSession.valueMap2}"); @@ -181,7 +182,7 @@ diff --git a/appserver/admingui/web/src/main/resources/grizzly/networkListenerNew.jsf b/appserver/admingui/web/src/main/resources/grizzly/networkListenerNew.jsf index fa50b0e7972..6744aabfee6 100644 --- a/appserver/admingui/web/src/main/resources/grizzly/networkListenerNew.jsf +++ b/appserver/admingui/web/src/main/resources/grizzly/networkListenerNew.jsf @@ -51,10 +51,11 @@ $page{configName} default="server-config"); + getRequestValue(key="configName" value=>$page{configName}); + urlencode(value="#{pageSession.configName}" encoding="UTF-8" result="#{pageSession.encodedConfigName}"); setPageSessionAttribute(key="parentPage" value="#{request.contextPath}/web/grizzly/networkListeners.jsf"); setPageSessionAttribute(key="childType" value="network-listener"); - setPageSessionAttribute(key="parentUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.configName}/network-config/network-listeners"); + setPageSessionAttribute(key="parentUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.encodedConfigName}/network-config/network-listeners"); setPageSessionAttribute(key="selfUrl", value="#{pageSession.parentUrl}/#{pageSession.childType}"); setPageSessionAttribute(key="rest-api" value="true"); gf.getDefaultValues(endpoint="#{pageSession.selfUrl}", valueMap="#{pageSession.valueMap}"); @@ -70,7 +71,9 @@ setPageSessionAttribute(key="hasPropertyTable" value="#{false}" ); /> -" + +" + #include "/common/shared/alertMsg.inc" @@ -79,9 +82,9 @@ $attribute{selectedRows}); foreach (var="row" list="${selectedRows}") { setPageSessionAttribute(key="networkListenerName" value="#{row['name']}"); - setPageSessionAttribute(key="networkListenerUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.configName}/network-config/network-listeners/network-listener"); + setPageSessionAttribute(key="networkListenerUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.encodedConfigName}/network-config/network-listeners/network-listener"); gf.restRequest(endpoint="#{pageSession.networkListenerUrl}/#{pageSession.networkListenerName}.json", method="get", result="#{pageSession.networkListAttrs}"); setPageSessionAttribute(key="protocolName" value="#{pageSession.networkListAttrs.data.extraProperties.entity['protocol']}"); - setPageSessionAttribute(key="protocolUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.configName}/network-config/protocols/protocol/#{pageSession.protocolName}"); - setPageSessionAttribute(key="protocolHttpUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.configName}/network-config/protocols/protocol/#{pageSession.protocolName}/http"); - setPageSessionAttribute(key="virtualServerUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.configName}/http-service/virtual-server"); + urlencode(value="#{pageSession.protocolName}" encoding="UTF-8" result="#{pageSession.encodedProtocolName}"); + setPageSessionAttribute(key="protocolUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.encodedConfigName}/network-config/protocols/protocol/#{pageSession.encodedProtocolName}"); + setPageSessionAttribute(key="protocolHttpUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.encodedConfigName}/network-config/protocols/protocol/#{pageSession.encodedProtocolName}/http"); + setPageSessionAttribute(key="virtualServerUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.encodedConfigName}/http-service/virtual-server"); gf.checkIfEndPointExist(endpoint="#{pageSession.protocolHttpUrl}", exists="#{pageSession.protocolHttpExist}"); // check if there is no listener exists for this protocol and it was created by GUI, then delete gf.getChildrenNamesList(endpoint="#{pageSession.networkListenerUrl}", id="name", result="#{pageSession.networkListeners}"); @@ -104,9 +105,10 @@ $page{configName} default="server-config"); + getRequestValue(key="configName" value=>$page{configName} ); + urlencode(value="#{pageSession.configName}" encoding="UTF-8" result="#{pageSession.encodedConfigName}"); setPageSessionAttribute(key="childType" value="network-listener"); - setPageSessionAttribute(key="parentUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.configName}/network-config/network-listeners"); + setPageSessionAttribute(key="parentUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.encodedConfigName}/network-config/network-listeners"); setPageSessionAttribute(key="selfUrl", value="#{pageSession.parentUrl}/#{pageSession.childType}"); setPageSessionAttribute(key="rest-api" value="true"); @@ -120,7 +122,7 @@ setPageSessionAttribute(key="tableTitle" value="$resource{i18n_web.grizzly.networkListeners.tableName}"); /> -" +" #include "/common/shared/alertMsg.inc" @@ -62,10 +62,11 @@ getSelectedSingleMapRows(TableRowGroup="${tableRowGroup}" selectedRows=>$attribute{selectedRows}); foreach (var="row" list="${selectedRows}") { setPageSessionAttribute(key="protocolName" value="#{row['name']}"); - setPageSessionAttribute(key="protocolUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.configName}/network-config/protocols/protocol/#{pageSession.protocolName}"); + urlencode(value="#{pageSession.protocolName}" encoding="UTF-8" result="#{pageSession.encodedProtocolName}"); + setPageSessionAttribute(key="protocolUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.encodedConfigName}/network-config/protocols/protocol/#{pageSession.encodedProtocolName}"); setPageSessionAttribute(key="protocolHttpUrl", value="#{pageSession.protocolUrl}/http"); - setPageSessionAttribute(key="networkListenerUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.configName}/network-config/network-listeners/network-listener"); - setPageSessionAttribute(key="virtualServerUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.configName}/http-service/virtual-server"); + setPageSessionAttribute(key="networkListenerUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.encodedConfigName}/network-config/network-listeners/network-listener"); + setPageSessionAttribute(key="virtualServerUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.encodedConfigName}/http-service/virtual-server"); gf.getChildrenNamesList(endpoint="#{pageSession.networkListenerUrl}", id="name", result="#{pageSession.networkListeners}"); gf.checkIfEndPointExist(endpoint="#{pageSession.protocolHttpUrl}", exists="#{pageSession.protocolHttpExist}"); foreach (var="listener" list="#{pageSession.networkListeners}") { @@ -94,10 +95,11 @@ $page{configName} default="server-config"); + urlencode(value="#{pageSession.configName}" encoding="UTF-8" result="#{pageSession.encodedConfigName}"); setPageSessionAttribute(key="childType" value="protocol"); - setPageSessionAttribute(key="selfUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.configName}/network-config/protocols"); + setPageSessionAttribute(key="selfUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.encodedConfigName}/network-config/protocols"); setPageSessionAttribute(key="rest-api" value="true"); - setPageSessionAttribute(key="networkListenerUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.configName}/network-config/network-listeners/network-listener"); + setPageSessionAttribute(key="networkListenerUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.encodedConfigName}/network-config/network-listeners/network-listener"); gf.getChildrenNamesList(endpoint="#{pageSession.networkListenerUrl}", id="name", result="#{pageSession.networkListeners}"); gf.getProtocols(configName="#{pageSession.configName}", result="#{requestScope.listOfRows}"); foreach (var="protocol" list="#{requestScope.listOfRows}") { @@ -121,7 +123,7 @@ setPageSessionAttribute(key="tableTitle" value="$resource{i18n_web.grizzly.protocol.tableName}"); /> -" +" #include "/common/shared/alertMsg.inc" $page{configName} default="server-config"); + getRequestValue(key="configName" value=>$page{configName} ); + urlencode(value="#{pageSession.configName}" encoding="UTF-8" result="#{pageSession.encodedConfigName}"); setPageSessionAttribute(key="childType" value="transport"); - setPageSessionAttribute(key="parentUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.configName}/network-config/transports"); + setPageSessionAttribute(key="parentUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.encodedConfigName}/network-config/transports"); setPageSessionAttribute(key="rest-api" value="true"); gf.getChildList(parentEndpoint="#{pageSession.parentUrl}", childType="#{pageSession.childType}", result="#{requestScope.listOfRows}"); createMap(result="#{pageSession.valueMap}"); @@ -67,7 +68,7 @@ setPageSessionAttribute(key="tableTitle" value="$resource{i18n_web.transport.tableName}"); /> -" +" #include "/common/shared/alertMsg.inc"