Return-Path: Delivered-To: apmail-incubator-abdera-dev-archive@locus.apache.org Received: (qmail 37058 invoked from network); 15 Apr 2008 11:08:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Apr 2008 11:08:08 -0000 Received: (qmail 14746 invoked by uid 500); 15 Apr 2008 11:08:07 -0000 Delivered-To: apmail-incubator-abdera-dev-archive@incubator.apache.org Received: (qmail 14641 invoked by uid 500); 15 Apr 2008 11:08:07 -0000 Mailing-List: contact abdera-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: abdera-dev@incubator.apache.org Delivered-To: mailing list abdera-dev@incubator.apache.org Received: (qmail 14632 invoked by uid 99); 15 Apr 2008 11:08:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Apr 2008 04:08:07 -0700 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.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Apr 2008 11:07:33 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id CAD31234C0D1 for ; Tue, 15 Apr 2008 04:05:04 -0700 (PDT) Message-ID: <2126891933.1208257504829.JavaMail.jira@brutus> Date: Tue, 15 Apr 2008 04:05:04 -0700 (PDT) From: "David Calavera (JIRA)" To: abdera-dev@incubator.apache.org Subject: [jira] Updated: (ABDERA-146) Bad entry edit link created in my server when using a provider base path In-Reply-To: <1562250313.1208230264773.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/ABDERA-146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] David Calavera updated ABDERA-146: ---------------------------------- Attachment: (was: route_manager.patch) > Bad entry edit link created in my server when using a provider base path > ------------------------------------------------------------------------ > > Key: ABDERA-146 > URL: https://issues.apache.org/jira/browse/ABDERA-146 > Project: Abdera > Issue Type: Bug > Affects Versions: 0.4.0 > Reporter: Remy Gendron > Attachments: route_manager.patch > > > My Abdera servlet is not mapped to the root of my application context. It is mapped to /atom/*, so that my application context can host multiple servlets and a static HTML site at the root path. > Thus, I create my provider with a base of /atom/. This in turn creates the following route: /atom/:collection/:entry > When I GET an entry, the resolving part goes well. However, the generated edit link for this entry duplicates the base part of the URI. > RouteManager.urlFor(RequestContext, Object, Object) line: 158 > SpringProvider(AbstractProvider).urlFor(RequestContext, Object, Object) line: 102 > ServletRequestContext(AbstractRequestContext).urlFor(Object, Object) line: 184 > MovieAdapter(AbstractCollectionAdapter).getHref(RequestContext) line: 82 > MovieAdapter(AbstractEntityCollectionAdapter).getFeedIriForEntry(T, RequestContext) line: 548 > MovieAdapter(AbstractEntityCollectionAdapter).getEntryFromCollectionProvider(RequestContext) line: 721 > MovieAdapter(AbstractEntityCollectionAdapter).getEntry(RequestContext) line: 316 > SpringProvider(AbstractProvider).process(RequestContext) line: 155 > The last stack frame (urlFor) is where I believe the error is. The route expands properly and includes the provider base path. However, the getTargetBasePath() call concatenates the application context with the servlet path, the servlet path being equal to the provider base path. > Real values used in my tests: > application context: /imdb > provider base: /atom/ > adapter href: movies > GET URI: http://localhost:8080/imdb/atom/movies/12345 > The generated edit URI is: http://localhost:8080/imdb/atom/atom/movies/12345 > Thanks for looking into this. > Remy -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.