From 89624a319b0c548edc31f8b4def01a0ee44c1871 Mon Sep 17 00:00:00 2001 From: AlanRoth Date: Wed, 13 Nov 2019 13:31:39 +0000 Subject: [PATCH 1/3] Problem when trying to override system porperties --- .../org/glassfish/admingui/common/util/RestUtil.java | 2 +- .../main/resources/configuration/sysInstanceValues.jsf | 10 +++++----- .../resources/custom/SystemPropertiesCliResource.java | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/appserver/admingui/common/src/main/java/org/glassfish/admingui/common/util/RestUtil.java b/appserver/admingui/common/src/main/java/org/glassfish/admingui/common/util/RestUtil.java index ecb3702c593..486e6821c3c 100644 --- a/appserver/admingui/common/src/main/java/org/glassfish/admingui/common/util/RestUtil.java +++ b/appserver/admingui/common/src/main/java/org/glassfish/admingui/common/util/RestUtil.java @@ -885,7 +885,7 @@ public static RestResponse post(String address, Object payload, String contentTy } Response cr = target.request(RESPONSE_TYPE).header("Content-Type", contentType) .cookie(new Cookie(REST_TOKEN_COOKIE, getRestToken())) - // .header("Content-type", MediaType.APPLICATION_FORM_URLENCODED) + .header("Content-type", MediaType.APPLICATION_FORM_URLENCODED) .post(Entity.entity(payload, contentType), Response.class); RestResponse rr = RestResponse.getRestResponse(cr); return rr; diff --git a/appserver/admingui/common/src/main/resources/configuration/sysInstanceValues.jsf b/appserver/admingui/common/src/main/resources/configuration/sysInstanceValues.jsf index 73515a7a5b6..971b0b54ea3 100644 --- a/appserver/admingui/common/src/main/resources/configuration/sysInstanceValues.jsf +++ b/appserver/admingui/common/src/main/resources/configuration/sysInstanceValues.jsf @@ -56,8 +56,8 @@ setPageSessionAttribute(key="selfPage", value="#{request.contextPath}/common/configuration/sysInstanceValues.jsf?configName=#{pageSession.configName}"); setPageSessionAttribute(key="parentUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.configName}"); setPageSessionAttribute(key="selfUrl", value="#{pageSession.parentUrl}/system-properties"); - gf.restRequest(endpoint="#{sessionScope.REST_URL}/configs/config/#{pageSession.configName}/system-property/#{pageSession.propName}", method="get", - result="#{requestScope.result}"); + gf.restRequest(endpoint="#{sessionScope.REST_URL}/configs/config/#{pageSession.configName}/system-property/#{pageSession.propName}", + method="get", result="#{requestScope.result}"); setPageSessionAttribute(key="defaultValue", value="#{requestScope.result.data.extraProperties.entity.value}"); // Get instance to cluster mapping @@ -107,9 +107,9 @@ data) { return options.toString(); } - + protected Response saveProperties(Map data) { return saveProperties(null, data); } From 6b30036551efeb00edc478c93d824ca6b27ce56d Mon Sep 17 00:00:00 2001 From: AlanRoth Date: Wed, 13 Nov 2019 13:33:07 +0000 Subject: [PATCH 2/3] License year --- .../main/java/org/glassfish/admingui/common/util/RestUtil.java | 2 +- .../src/main/resources/configuration/sysInstanceValues.jsf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/appserver/admingui/common/src/main/java/org/glassfish/admingui/common/util/RestUtil.java b/appserver/admingui/common/src/main/java/org/glassfish/admingui/common/util/RestUtil.java index 486e6821c3c..58c13b1aa43 100644 --- a/appserver/admingui/common/src/main/java/org/glassfish/admingui/common/util/RestUtil.java +++ b/appserver/admingui/common/src/main/java/org/glassfish/admingui/common/util/RestUtil.java @@ -1,7 +1,7 @@ /* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * - * Copyright (c) 2009-2013 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009-2019 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 diff --git a/appserver/admingui/common/src/main/resources/configuration/sysInstanceValues.jsf b/appserver/admingui/common/src/main/resources/configuration/sysInstanceValues.jsf index 971b0b54ea3..9cfe6d2af2d 100644 --- a/appserver/admingui/common/src/main/resources/configuration/sysInstanceValues.jsf +++ b/appserver/admingui/common/src/main/resources/configuration/sysInstanceValues.jsf @@ -2,7 +2,7 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - Copyright (c) 2010-2011 Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2010-2019 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 From 495d2fcde019c20c7d76c93590162463d5b9b802 Mon Sep 17 00:00:00 2001 From: Alan Date: Tue, 19 Nov 2019 11:02:03 +0000 Subject: [PATCH 3/3] Revert header content type Unnecessary change --- .../main/java/org/glassfish/admingui/common/util/RestUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appserver/admingui/common/src/main/java/org/glassfish/admingui/common/util/RestUtil.java b/appserver/admingui/common/src/main/java/org/glassfish/admingui/common/util/RestUtil.java index 58c13b1aa43..55497f90b59 100644 --- a/appserver/admingui/common/src/main/java/org/glassfish/admingui/common/util/RestUtil.java +++ b/appserver/admingui/common/src/main/java/org/glassfish/admingui/common/util/RestUtil.java @@ -885,7 +885,7 @@ public static RestResponse post(String address, Object payload, String contentTy } Response cr = target.request(RESPONSE_TYPE).header("Content-Type", contentType) .cookie(new Cookie(REST_TOKEN_COOKIE, getRestToken())) - .header("Content-type", MediaType.APPLICATION_FORM_URLENCODED) + // .header("Content-type", MediaType.APPLICATION_FORM_URLENCODED) .post(Entity.entity(payload, contentType), Response.class); RestResponse rr = RestResponse.getRestResponse(cr); return rr;