[
https://issues.apache.org/jira/browse/JCR-4460?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16892271#comment-16892271
]
Woonsan Ko commented on JCR-4460:
---------------------------------
Hi [~reschke],
Perhaps you already knew it, but here's my findings:
- The reason why it fails in my testing (JCR-4458) but it doesn't with the
integrationTesting is because the former sets the
{{INIT_PARAM_RESOURCE_PATH_PREFIX}} init parameter to a context relative path
(e.g, {{/server}}) whereas the latter in {{RepositoryStubImpl}} sets it to a
path including the context path (e.g, {{/app1/server}}).
- As a result, {{org.apache.jackrabbit.webdav.AbstractLocatorFactory}}
instances have different values: one without the contextPath and the other with
it for the {{pathPrefix}} member.
- So,
{{org.apache.jackrabbit.webdav.AbstractLocatorFactory#createResourceLocator(String,
String)}} is able to remove the contextPath when executing the
integrationTesting.
I think that the init param configuration, {{INIT_PARAM_RESOURCE_PATH_PREFIX}},
should still be a context relative path without contextPath to avoid any
deployment issues.
But I guess the servlet may prepend the contextPath for its {{pathPrefix}}
member setting.
Regards,
Woonsan
> allow to run remoted conformance tests with a custom servlet context path
> -------------------------------------------------------------------------
>
> Key: JCR-4460
> URL: https://issues.apache.org/jira/browse/JCR-4460
> Project: Jackrabbit Content Repository
> Issue Type: Task
> Components: jackrabbit-jcr2dav
> Reporter: Julian Reschke
> Assignee: Julian Reschke
> Priority: Minor
> Labels: candidate_jcr_2_16
> Fix For: 2.20, 2.19.4, 2.18.3
>
> Attachments: use-context-path.diff
>
>
> Add a system property that selects a servlet context path for testing.
> To run tests with non-root path:
> {noformat}
> mvn clean install -PintegrationTesting -DWebDAVServletContext="/foobar/"
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)