Return-Path: Delivered-To: apmail-felix-dev-archive@www.apache.org Received: (qmail 73282 invoked from network); 24 Jan 2011 10:47:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 24 Jan 2011 10:47:11 -0000 Received: (qmail 91926 invoked by uid 500); 24 Jan 2011 10:47:11 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 91605 invoked by uid 500); 24 Jan 2011 10:47:09 -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 91597 invoked by uid 99); 24 Jan 2011 10:47:07 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Jan 2011 10:47:07 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Jan 2011 10:47:05 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id p0OAkh4t008804 for ; Mon, 24 Jan 2011 10:46:43 GMT Message-ID: <7703014.149621295866003261.JavaMail.jira@thor> Date: Mon, 24 Jan 2011 05:46:43 -0500 (EST) From: "Felix Meschberger (JIRA)" To: dev@felix.apache.org Subject: [jira] Updated: (FELIX-2774) HTTP Servlet RequestDispatcher 'forward' has invalid request pathInfo In-Reply-To: <20562257.295091294780367766.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/FELIX-2774?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Felix Meschberger updated FELIX-2774: ------------------------------------- Attachment: FELIX-2774-simple.patch Attaching correct patch this time > HTTP Servlet RequestDispatcher 'forward' has invalid request pathInfo > --------------------------------------------------------------------- > > Key: FELIX-2774 > URL: https://issues.apache.org/jira/browse/FELIX-2774 > Project: Felix > Issue Type: Bug > Components: HTTP Service > Affects Versions: http-2.0.4 > Reporter: David Hay > Attachments: FELIX-2774-simple.patch > > > I'm trying to have one servlet forward to another servlet. However, the forwarding doesn't seem to work. > I've set up the proxy servlet in my web.xml as follows (and this is the only servlet...no filters defined) > > osgi-servlet-bridge > org.apache.felix.http.proxy.ProxyServlet > 1 > > > osgi-servlet-bridge > /* > > I then have two bundles, each registers a servlet under a different path (e.g. bundle A registers under alias '/a' and bundle B registers under alias '/b') using the whiteboard pattern. The implementation of servlet A ends up doing this: > RequestDispatcher rd = request.getRequestDispatcher("/b/some/path"); > rd.forward(request, response); > This finds the ServletHandler for servlet B just fine, but gets hung up in the 'handle' method. I think this is due to the implementation of the internal RequestWrapper class in the ServletPipeline class. This implementation overrides the getRequestURI method with the passed in value. However, ServletHandler.handle passed the result of HttpServletRequest.getPathInfo() to the 'matches' method as a final check to make sure that the servlet should be invoked. Since the RequestWrapper class does not override getPathInfo, it returns the value from the original request....which is '/a' in my example. > -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.