You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by pa...@apache.org on 2025/07/03 10:59:41 UTC
(felix-dev) branch maintenance/FELIX-6791-Only-a-single-format-can-be-allowed-when-using-Pax-Web created (now 671b33fe47)
This is an automated email from the ASF dual-hosted git repository.
paulrutter pushed a change to branch maintenance/FELIX-6791-Only-a-single-format-can-be-allowed-when-using-Pax-Web
in repository https://gitbox.apache.org/repos/asf/felix-dev.git
at 671b33fe47 FELIX-6791 Only a single format can be allowed when using Pax Web - Add unique servlet name to each registered servlet via the whiteboard pattern
This branch includes the following new commits:
new 671b33fe47 FELIX-6791 Only a single format can be allowed when using Pax Web - Add unique servlet name to each registered servlet via the whiteboard pattern
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(felix-dev) 01/01: FELIX-6791 Only a single format can be allowed when using Pax Web - Add unique servlet name to each registered servlet via the whiteboard pattern
Posted by pa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
paulrutter pushed a commit to branch maintenance/FELIX-6791-Only-a-single-format-can-be-allowed-when-using-Pax-Web
in repository https://gitbox.apache.org/repos/asf/felix-dev.git
commit 671b33fe47737371029d2840b9488bb7ae7dbe6c
Author: Paul Rütter <pa...@blueconic.com>
AuthorDate: Thu Jul 3 12:59:26 2025 +0200
FELIX-6791 Only a single format can be allowed when using Pax Web
- Add unique servlet name to each registered servlet via the whiteboard pattern
---
.../apache/felix/hc/core/impl/servlet/HealthCheckExecutorServlet.java | 3 +++
1 file changed, 3 insertions(+)
diff --git a/healthcheck/core/src/main/java/org/apache/felix/hc/core/impl/servlet/HealthCheckExecutorServlet.java b/healthcheck/core/src/main/java/org/apache/felix/hc/core/impl/servlet/HealthCheckExecutorServlet.java
index 5c1ca17601..ad1818dce6 100644
--- a/healthcheck/core/src/main/java/org/apache/felix/hc/core/impl/servlet/HealthCheckExecutorServlet.java
+++ b/healthcheck/core/src/main/java/org/apache/felix/hc/core/impl/servlet/HealthCheckExecutorServlet.java
@@ -20,6 +20,7 @@ package org.apache.felix.hc.core.impl.servlet;
import static org.osgi.service.servlet.whiteboard.HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_SELECT;
import static org.osgi.service.servlet.whiteboard.HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_NAME;
import static org.osgi.service.servlet.whiteboard.HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_PATTERN;
+import static org.osgi.service.servlet.whiteboard.HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_NAME;
import java.io.IOException;
import java.io.PrintWriter;
@@ -253,6 +254,8 @@ public class HealthCheckExecutorServlet extends HttpServlet {
private void registerServlet(final ServletInfoDTO servletInfo) {
final Dictionary<String, Object> properties = new Hashtable<>();
+ // FELIX-6791 Add unique servlet name
+ properties.put(HTTP_WHITEBOARD_SERVLET_NAME, servletInfo.contextName + "." + servletInfo.servletPath + "." + servletInfo.servlet.getClass().getSimpleName());
if (servletInfo.contextName != null && !servletInfo.contextName.isEmpty()) {
properties.put(HTTP_WHITEBOARD_CONTEXT_SELECT, "(".concat(HTTP_WHITEBOARD_CONTEXT_NAME).concat("=").concat(servletInfo.contextName).concat(")"));
}