Package javax.ws.rs.core

Examples of javax.ws.rs.core.UriBuilder.replacePath()


        final UriBuilder absoluteUriBuilder = UriBuilder.fromUri(
                request.getRequestURL().toString());

        final URI baseUri = (filterContextPath == null)
                ? absoluteUriBuilder.replacePath(request.getContextPath()).
                path("/").
                build()
                : absoluteUriBuilder.replacePath(request.getContextPath()).
                path(filterContextPath).
                path("/").
View Full Code Here


        final URI baseUri = (filterContextPath == null)
                ? absoluteUriBuilder.replacePath(request.getContextPath()).
                path("/").
                build()
                : absoluteUriBuilder.replacePath(request.getContextPath()).
                path(filterContextPath).
                path("/").
                build();

        final URI requestUri = absoluteUriBuilder.replacePath(requestURI).
View Full Code Here

                : absoluteUriBuilder.replacePath(request.getContextPath()).
                path(filterContextPath).
                path("/").
                build();

        final URI requestUri = absoluteUriBuilder.replacePath(requestURI).
                replaceQuery(queryString).
                build();

        final int status = service(baseUri, requestUri, request, response).get();
View Full Code Here

        }

        final URI baseUri;
        final URI requestUri;
        try {
            baseUri = absoluteUriBuilder.replacePath(encodedBasePath).
                    build();

            String queryParameters = request.getQueryString();
            if (queryParameters == null) {
                queryParameters = "";
View Full Code Here

            String queryParameters = request.getQueryString();
            if (queryParameters == null) {
                queryParameters = "";
            }

            requestUri = absoluteUriBuilder.replacePath(requestURI).
                    replaceQuery(queryParameters).
                    build();
        } catch (UriBuilderException ex) {
            final Response.Status badRequest = Response.Status.BAD_REQUEST;
            if (webComponent.configSetStatusOverSendError) {
View Full Code Here

        final UriBuilder absoluteUriBuilder = UriBuilder.fromUri(
                request.getRequestURL().toString());

        final URI baseUri = (filterContextPath == null)
                ? absoluteUriBuilder.replacePath(request.getContextPath()).
                path("/").
                build()
                : absoluteUriBuilder.replacePath(request.getContextPath()).
                path(filterContextPath).
                path("/").
View Full Code Here

        final URI baseUri = (filterContextPath == null)
                ? absoluteUriBuilder.replacePath(request.getContextPath()).
                path("/").
                build()
                : absoluteUriBuilder.replacePath(request.getContextPath()).
                path(filterContextPath).
                path("/").
                build();

        final URI requestUri = absoluteUriBuilder.replacePath(requestURI).
View Full Code Here

                : absoluteUriBuilder.replacePath(request.getContextPath()).
                path(filterContextPath).
                path("/").
                build();

        final URI requestUri = absoluteUriBuilder.replacePath(requestURI).
                replaceQuery(queryString).
                build();

        final int status = service(baseUri, requestUri, request, response).get();
View Full Code Here

        builder = new UriBuilderImpl();
        builder.segment("path1").segment("{var1}");
        uri = builder.build("/s1,s2");
        assertEquals("path1/%2Fs1,s2", uri.toString());

        builder.replacePath("/r1/{v1}");
        uri = builder.build("r2");
        assertEquals("/r1/r2", uri.toString());

        builder.replacePath("r1/{v1}");
        uri = builder.build("r2");
View Full Code Here

        builder.replacePath("/r1/{v1}");
        uri = builder.build("r2");
        assertEquals("/r1/r2", uri.toString());

        builder.replacePath("r1/{v1}");
        uri = builder.build("r2");
        assertEquals("r1/r2", uri.toString());
    }

    public void testMatrix() {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.