>It would be of great help if you could try debugging the
>ServletContainer.service method on WebSphere? and reporting back how
>things behave?
Here is variables from websphere debug session, hope it helps.
before UriBuilder absoluteUriBuilder =
UriBuilder.fromUri(request.getRequestURL().toString());
"request.getPathInfo()"= null
"request.getRequestURI()"= "/webapp/resource/"
"request.getRequestURL().toString()"= "
http://localhost:9081/webapp/resource/"
"request.getContextPath()"= "/webapp"
"decodedBasePath" = "/webapp/"
absoluteUriBuilder.paths contains 3 elements ["webapp","resource", ""]
>final URI baseUri = absoluteUriBuilder.replacePath(encodedBasePath).
build();
"baseuri.toString()" = "
http://localhost:9081/webapp/"
>final URI requestUri = absoluteUriBuilder.replacePath(request.getRequestURI()).
replaceQuery(queryParameters).
build();
requestUri.toString() = "
http://localhost:9081/webapp/resource/"
If I`ve missed something, please, let me know.
Best regards,
Saiid.