abdera-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Diephouse (JIRA)" <j...@apache.org>
Subject [jira] Closed: (ABDERA-146) Bad entry edit link created in my server when using a provider base path
Date Thu, 17 Apr 2008 21:23:22 GMT

     [ https://issues.apache.org/jira/browse/ABDERA-146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Dan Diephouse closed ABDERA-146.
--------------------------------

    Resolution: Fixed

Thanks for the patches. I've applied these in: http://svn.apache.org/viewvc?rev=649280&view=rev

> 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
>            Assignee: Dan Diephouse
>         Attachments: DefaultWorkspaceManager.patch, 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<T>).getFeedIriForEntry(T, RequestContext)
line: 548	
> MovieAdapter(AbstractEntityCollectionAdapter<T>).getEntryFromCollectionProvider(RequestContext)
line: 721	
> MovieAdapter(AbstractEntityCollectionAdapter<T>).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.


Mime
View raw message