Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 51DF5200B5B for ; Fri, 5 Aug 2016 16:54:23 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 50824160A8E; Fri, 5 Aug 2016 14:54:23 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 8E4E4160A64 for ; Fri, 5 Aug 2016 16:54:22 +0200 (CEST) Received: (qmail 85296 invoked by uid 500); 5 Aug 2016 14:54:21 -0000 Mailing-List: contact dev-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list dev@felix.apache.org Received: (qmail 85282 invoked by uid 99); 5 Aug 2016 14:54:21 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Aug 2016 14:54:21 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 1D5EE2C0D5D for ; Fri, 5 Aug 2016 14:54:21 +0000 (UTC) Date: Fri, 5 Aug 2016 14:54:21 +0000 (UTC) From: "Carsten Ziegeler (JIRA)" To: dev@felix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (FELIX-5319) HttpServiceRuntime provides incorrect info for service that is both Servlet and Resource MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 05 Aug 2016 14:54:23 -0000 [ https://issues.apache.org/jira/browse/FELIX-5319?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Carsten Ziegeler updated FELIX-5319: ------------------------------------ Fix Version/s: http.bridge-3.0.12 http.base-3.0.12 > HttpServiceRuntime provides incorrect info for service that is both Servlet and Resource > ---------------------------------------------------------------------------------------- > > Key: FELIX-5319 > URL: https://issues.apache.org/jira/browse/FELIX-5319 > Project: Felix > Issue Type: Bug > Components: HTTP Service > Affects Versions: http.base-3.0.10, http.jetty-3.2.2, http.bridge-3.0.10 > Reporter: Derek Baum > Assignee: Carsten Ziegeler > Priority: Minor > Fix For: http.base-3.0.12, http.jetty-3.2.4, http.bridge-3.0.12 > > > I have a servlet defined as follows: > Note: it defines _both_ servlet and resource properties. > @Component(property = { > HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_NAME + "=Hello World", > HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_PATTERN + "=/hello/sayHello", > HttpWhiteboardConstants.HTTP_WHITEBOARD_RESOURCE_PATTERN + "=/hello/static/*", > HttpWhiteboardConstants.HTTP_WHITEBOARD_RESOURCE_PREFIX + "=/static" > }) > public class HelloWorldServlet extends HttpServlet implements Servlet { > } > I am using the HttpServiceRuntime to discover servlet info, but this servlet does not appear. > @Reference > HttpServiceRuntime httpRuntime; > RuntimeDTO runtimeDTO = httpRuntime.getRuntimeDTO(); > for (ServletContextDTO servletContextDTO : runtimeDTO.servletContextDTOs) { > ServletDTO[] servletDTOs = servletContextDTO.servletDTOs; > // servletDTOs.length == 0 > } > The equivalent code for ResourceDTO _does_ find a ResourceDTO for this servlet, but it contains servlet, rather than resource info: > resourceDTO.patterns = [/hello/sayHello] > resourceDTO.prefix = null > If I remove this resource property from the servlet, then the above code finds the servlet, as expected: > HttpWhiteboardConstants.HTTP_WHITEBOARD_RESOURCE_PATTERN + "=/hello/static/*" -- This message was sent by Atlassian JIRA (v6.3.4#6332)