You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@abdera.apache.org by "Remy Gendron (JIRA)" <ji...@apache.org> on 2008/04/15 05:31:04 UTC

[jira] Created: (ABDERA-146) Bad entry edit link created in my server when using a provider base path

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


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.

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.


Re: [jira] Commented: (ABDERA-146) Bad entry edit link created in my server when using a provider base path

Posted by James M Snell <ja...@gmail.com>.
I likely won't be able to get to this (or the other issues in jira) 
until at least the end of this week.  I'll be able to let you know my 
thoughts then.

- James

David Primmer wrote:
> Any comment on this going into .4? It is a bad breakage of routes. If
> .4 is not possible, then possibly a snapshot pushed up here:
> http://people.apache.org/repo/m2-snapshot-repository
> 
> thanks.
> 
> davep
> 
> On Tue, Apr 15, 2008 at 7:07 AM, Remy Gendron (JIRA) <ji...@apache.org> wrote:
>>     [ https://issues.apache.org/jira/browse/ABDERA-146?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12589091#action_12589091 ]
>>
>>  Remy Gendron commented on ABDERA-146:
>>  -------------------------------------
>>
>>  David, your fix is OK I think for the RouteManager itself.
>>
>>  However, there was still an issue in the DefaultWorkspaceManager. Following the fix in the RouteManager, the workspace could no longer find the requested adapter as now the two paths would not match.
>>
>>  I am proposing a patch for the DefaultWorkspaceManager. With it, all of my unit tests are green in the four combinations of root servlet path/specific servlet path and root application context/specific application context.
>>
>>  I think this needs to be included in the 0.4.0 branch if it is to become an RC1.
>>
>>  Thanks again David.
>>
>>  > 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<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.
>>
>>
> 

Re: [jira] Commented: (ABDERA-146) Bad entry edit link created in my server when using a provider base path

Posted by David Primmer <da...@gmail.com>.
rockin'. no more dupe paths. Thanks.

On Tue, Apr 29, 2008 at 5:22 PM, Dan Diephouse
<da...@mulesource.com> wrote:
> That would be because I forgot to switch my svn repository back to trunk/ it
>  seems... I'm pushing out a new snapshot now (its easy, just a mvn deploy) so
>  it should be done in 15 mins or so.
>
>  On Tue, Apr 29, 2008 at 5:11 PM, David Primmer <da...@gmail.com>
>  wrote:
>
>
>
>  > Thanks. That was fast Dan! However, I just switched to the
>  > 0.5.0-incubating-SNAPSHOT that you pushed today and it doesn't have
>  > the changes you made here:
>  >
>  > http://svn.apache.org/viewvc?view=rev&revision=649280
>  >
>  > still has the old RouteManager code.
>  >
>  > davep
>  >
>  >
>  > On Tue, Apr 29, 2008 at 1:56 PM, Dan Diephouse
>  > <da...@mulesource.com> wrote:
>  > > The release process takes a while due to incubation... But I pushed out
>  > a
>  > > new snapshot for you.
>  > >  Regards,
>  > >  Dan
>  > >
>  > >
>  > >
>  > >  David Primmer wrote:
>  > >
>  > > > Any comment on this going into .4? It is a bad breakage of routes. If
>  > > > .4 is not possible, then possibly a snapshot pushed up here:
>  > > > http://people.apache.org/repo/m2-snapshot-repository
>  > > >
>  > > > thanks.
>  > > >
>  > > > davep
>  > > >
>  > > > On Tue, Apr 15, 2008 at 7:07 AM, Remy Gendron (JIRA) <ji...@apache.org>
>  > > wrote:
>  > > >
>  > > >
>  > > > >    [
>  > >
>  > https://issues.apache.org/jira/browse/ABDERA-146?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12589091#action_12589091
>  > > ]
>  > > > >
>  > > > >  Remy Gendron commented on ABDERA-146:
>  > > > >  -------------------------------------
>  > > > >
>  > > > >  David, your fix is OK I think for the RouteManager itself.
>  > > > >
>  > > > >  However, there was still an issue in the DefaultWorkspaceManager.
>  > > Following the fix in the RouteManager, the workspace could no longer
>  > find
>  > > the requested adapter as now the two paths would not match.
>  > > > >
>  > > > >  I am proposing a patch for the DefaultWorkspaceManager. With it,
>  > all of
>  > > my unit tests are green in the four combinations of root servlet
>  > > path/specific servlet path and root application context/specific
>  > application
>  > > context.
>  > > > >
>  > > > >  I think this needs to be included in the 0.4.0 branch if it is to
>  > > become an RC1.
>  > > > >
>  > > > >  Thanks again David.
>  > > > >
>  > > > >  > 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<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.
>  > > > >
>  > > > >
>  > > > >
>  > > > >
>  > > >
>  > >
>  > >
>  > >  --
>  > >  Dan Diephouse
>  > >  MuleSource
>  > >  http://mulesource.com | http://netzooid.com
>  > >
>  >
>
>
>
>  --
>  Dan Diephouse
>  http://mulesource.com | http://netzooid.com/blog
>

Re: [jira] Commented: (ABDERA-146) Bad entry edit link created in my server when using a provider base path

Posted by Dan Diephouse <da...@mulesource.com>.
That would be because I forgot to switch my svn repository back to trunk/ it
seems... I'm pushing out a new snapshot now (its easy, just a mvn deploy) so
it should be done in 15 mins or so.

On Tue, Apr 29, 2008 at 5:11 PM, David Primmer <da...@gmail.com>
wrote:

> Thanks. That was fast Dan! However, I just switched to the
> 0.5.0-incubating-SNAPSHOT that you pushed today and it doesn't have
> the changes you made here:
>
> http://svn.apache.org/viewvc?view=rev&revision=649280
>
> still has the old RouteManager code.
>
> davep
>
>
> On Tue, Apr 29, 2008 at 1:56 PM, Dan Diephouse
> <da...@mulesource.com> wrote:
> > The release process takes a while due to incubation... But I pushed out
> a
> > new snapshot for you.
> >  Regards,
> >  Dan
> >
> >
> >
> >  David Primmer wrote:
> >
> > > Any comment on this going into .4? It is a bad breakage of routes. If
> > > .4 is not possible, then possibly a snapshot pushed up here:
> > > http://people.apache.org/repo/m2-snapshot-repository
> > >
> > > thanks.
> > >
> > > davep
> > >
> > > On Tue, Apr 15, 2008 at 7:07 AM, Remy Gendron (JIRA) <ji...@apache.org>
> > wrote:
> > >
> > >
> > > >    [
> >
> https://issues.apache.org/jira/browse/ABDERA-146?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12589091#action_12589091
> > ]
> > > >
> > > >  Remy Gendron commented on ABDERA-146:
> > > >  -------------------------------------
> > > >
> > > >  David, your fix is OK I think for the RouteManager itself.
> > > >
> > > >  However, there was still an issue in the DefaultWorkspaceManager.
> > Following the fix in the RouteManager, the workspace could no longer
> find
> > the requested adapter as now the two paths would not match.
> > > >
> > > >  I am proposing a patch for the DefaultWorkspaceManager. With it,
> all of
> > my unit tests are green in the four combinations of root servlet
> > path/specific servlet path and root application context/specific
> application
> > context.
> > > >
> > > >  I think this needs to be included in the 0.4.0 branch if it is to
> > become an RC1.
> > > >
> > > >  Thanks again David.
> > > >
> > > >  > 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<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.
> > > >
> > > >
> > > >
> > > >
> > >
> >
> >
> >  --
> >  Dan Diephouse
> >  MuleSource
> >  http://mulesource.com | http://netzooid.com
> >
>



-- 
Dan Diephouse
http://mulesource.com | http://netzooid.com/blog

Re: [jira] Commented: (ABDERA-146) Bad entry edit link created in my server when using a provider base path

Posted by David Primmer <da...@gmail.com>.
Thanks. That was fast Dan! However, I just switched to the
0.5.0-incubating-SNAPSHOT that you pushed today and it doesn't have
the changes you made here:

http://svn.apache.org/viewvc?view=rev&revision=649280

still has the old RouteManager code.

davep


On Tue, Apr 29, 2008 at 1:56 PM, Dan Diephouse
<da...@mulesource.com> wrote:
> The release process takes a while due to incubation... But I pushed out a
> new snapshot for you.
>  Regards,
>  Dan
>
>
>
>  David Primmer wrote:
>
> > Any comment on this going into .4? It is a bad breakage of routes. If
> > .4 is not possible, then possibly a snapshot pushed up here:
> > http://people.apache.org/repo/m2-snapshot-repository
> >
> > thanks.
> >
> > davep
> >
> > On Tue, Apr 15, 2008 at 7:07 AM, Remy Gendron (JIRA) <ji...@apache.org>
> wrote:
> >
> >
> > >    [
> https://issues.apache.org/jira/browse/ABDERA-146?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12589091#action_12589091
> ]
> > >
> > >  Remy Gendron commented on ABDERA-146:
> > >  -------------------------------------
> > >
> > >  David, your fix is OK I think for the RouteManager itself.
> > >
> > >  However, there was still an issue in the DefaultWorkspaceManager.
> Following the fix in the RouteManager, the workspace could no longer find
> the requested adapter as now the two paths would not match.
> > >
> > >  I am proposing a patch for the DefaultWorkspaceManager. With it, all of
> my unit tests are green in the four combinations of root servlet
> path/specific servlet path and root application context/specific application
> context.
> > >
> > >  I think this needs to be included in the 0.4.0 branch if it is to
> become an RC1.
> > >
> > >  Thanks again David.
> > >
> > >  > 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<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.
> > >
> > >
> > >
> > >
> >
>
>
>  --
>  Dan Diephouse
>  MuleSource
>  http://mulesource.com | http://netzooid.com
>

Re: [jira] Commented: (ABDERA-146) Bad entry edit link created in my server when using a provider base path

Posted by Dan Diephouse <da...@mulesource.com>.
The release process takes a while due to incubation... But I pushed out 
a new snapshot for you.
Regards,
Dan

David Primmer wrote:
> Any comment on this going into .4? It is a bad breakage of routes. If
> .4 is not possible, then possibly a snapshot pushed up here:
> http://people.apache.org/repo/m2-snapshot-repository
>
> thanks.
>
> davep
>
> On Tue, Apr 15, 2008 at 7:07 AM, Remy Gendron (JIRA) <ji...@apache.org> wrote:
>   
>>     [ https://issues.apache.org/jira/browse/ABDERA-146?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12589091#action_12589091 ]
>>
>>  Remy Gendron commented on ABDERA-146:
>>  -------------------------------------
>>
>>  David, your fix is OK I think for the RouteManager itself.
>>
>>  However, there was still an issue in the DefaultWorkspaceManager. Following the fix in the RouteManager, the workspace could no longer find the requested adapter as now the two paths would not match.
>>
>>  I am proposing a patch for the DefaultWorkspaceManager. With it, all of my unit tests are green in the four combinations of root servlet path/specific servlet path and root application context/specific application context.
>>
>>  I think this needs to be included in the 0.4.0 branch if it is to become an RC1.
>>
>>  Thanks again David.
>>
>>  > 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<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.
>>
>>
>>     


-- 
Dan Diephouse
MuleSource
http://mulesource.com | http://netzooid.com 


Re: [jira] Commented: (ABDERA-146) Bad entry edit link created in my server when using a provider base path

Posted by David Primmer <da...@gmail.com>.
Any comment on this going into .4? It is a bad breakage of routes. If
.4 is not possible, then possibly a snapshot pushed up here:
http://people.apache.org/repo/m2-snapshot-repository

thanks.

davep

On Tue, Apr 15, 2008 at 7:07 AM, Remy Gendron (JIRA) <ji...@apache.org> wrote:
>
>     [ https://issues.apache.org/jira/browse/ABDERA-146?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12589091#action_12589091 ]
>
>  Remy Gendron commented on ABDERA-146:
>  -------------------------------------
>
>  David, your fix is OK I think for the RouteManager itself.
>
>  However, there was still an issue in the DefaultWorkspaceManager. Following the fix in the RouteManager, the workspace could no longer find the requested adapter as now the two paths would not match.
>
>  I am proposing a patch for the DefaultWorkspaceManager. With it, all of my unit tests are green in the four combinations of root servlet path/specific servlet path and root application context/specific application context.
>
>  I think this needs to be included in the 0.4.0 branch if it is to become an RC1.
>
>  Thanks again David.
>
>  > 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<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.
>
>

[jira] Updated: (ABDERA-146) Bad entry edit link created in my server when using a provider base path

Posted by "Remy Gendron (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ABDERA-146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Remy Gendron updated ABDERA-146:
--------------------------------

    Description: 
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

  was:
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.

Thanks for looking into this.

Remy


> 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
>
> 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.


[jira] Closed: (ABDERA-146) Bad entry edit link created in my server when using a provider base path

Posted by "Dan Diephouse (JIRA)" <ji...@apache.org>.
     [ 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.


[jira] Updated: (ABDERA-146) Bad entry edit link created in my server when using a provider base path

Posted by "David Calavera (JIRA)" <ji...@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: route_manager.patch

I'm not sure if this is correct, but I think that the RouteManager class should use the contextPath instead of the targetBasePath in order to create the url for the route.

> 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<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.


[jira] Updated: (ABDERA-146) Bad entry edit link created in my server when using a provider base path

Posted by "Remy Gendron (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ABDERA-146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Remy Gendron updated ABDERA-146:
--------------------------------

    Attachment: DefaultWorkspaceManager.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: 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.


[jira] Commented: (ABDERA-146) Bad entry edit link created in my server when using a provider base path

Posted by "Remy Gendron (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ABDERA-146?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12589091#action_12589091 ] 

Remy Gendron commented on ABDERA-146:
-------------------------------------

David, your fix is OK I think for the RouteManager itself.

However, there was still an issue in the DefaultWorkspaceManager. Following the fix in the RouteManager, the workspace could no longer find the requested adapter as now the two paths would not match.

I am proposing a patch for the DefaultWorkspaceManager. With it, all of my unit tests are green in the four combinations of root servlet path/specific servlet path and root application context/specific application context.

I think this needs to be included in the 0.4.0 branch if it is to become an RC1.

Thanks again David.

> 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<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.


[jira] Updated: (ABDERA-146) Bad entry edit link created in my server when using a provider base path

Posted by "David Calavera (JIRA)" <ji...@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: 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<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.


[jira] Updated: (ABDERA-146) Bad entry edit link created in my server when using a provider base path

Posted by "David Calavera (JIRA)" <ji...@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<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.


[jira] Updated: (ABDERA-146) Bad entry edit link created in my server when using a provider base path

Posted by "Dan Diephouse (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ABDERA-146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dan Diephouse updated ABDERA-146:
---------------------------------

    Fix Version/s: 0.5.0

> 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
>             Fix For: 0.5.0
>
>         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.


[jira] Assigned: (ABDERA-146) Bad entry edit link created in my server when using a provider base path

Posted by "Dan Diephouse (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ABDERA-146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dan Diephouse reassigned ABDERA-146:
------------------------------------

    Assignee: Dan Diephouse

> 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.