Package javax.ws.rs.core

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


    public AsyncWebResource uri(URI uri) {
        UriBuilder b = getUriBuilder();
        String path = uri.getRawPath();
        if (path != null && path.length() > 0) {
            if (path.startsWith("/")) {
                b.replacePath(path);
            } else {
                b.path(path);
            }
        }
        String query = uri.getRawQuery();
View Full Code Here


        if (np.equals(u.getRawPath())) {
            return u;
        }
       
        UriBuilder ub = UriBuilder.fromUri(u);
        return ub.replacePath(np).build();
    }
}
View Full Code Here

    public WebResource uri(URI uri) {
        UriBuilder b = getUriBuilder();
        String path = uri.getRawPath();
        if (path != null && path.length() > 0) {
            if (path.startsWith("/")) {
                b.replacePath(path);
            } else {
                b.path(path);
            }
        }
        String query = uri.getRawQuery();
View Full Code Here

    public AsyncWebResource uri(URI uri) {
        UriBuilder b = getUriBuilder();
        String path = uri.getRawPath();
        if (path != null && path.length() > 0) {
            if (path.startsWith("/")) {
                b.replacePath(path);
            } else {
                b.path(path);
            }
        }
        String query = uri.getRawQuery();
View Full Code Here

        if (!decodedBasePath.equals(encodedBasePath)) {
            throw new ContainerException("The servlet context path and/or the " +
                    "servlet path contain characters that are percent enocded");
        }

        final URI 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 = "";
        }

        final URI requestUri = absoluteUriBuilder.replacePath(request.getRequestURI()).
                replaceQuery(queryParameters).
                build();

        service(baseUri, requestUri, request, response);
    }
View Full Code Here

     */
    public void doFilter(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws IOException, ServletException {
        final UriBuilder absoluteUriBuilder = UriBuilder.fromUri(
                request.getRequestURL().toString());

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

        final URI requestUri = absoluteUriBuilder.replacePath(request.getRequestURI()).
                replaceQuery(request.getQueryString()).
View Full Code Here

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

        final URI requestUri = absoluteUriBuilder.replacePath(request.getRequestURI()).
                replaceQuery(request.getQueryString()).
                build();

        service(baseUri, requestUri, request, response);
    }
View Full Code Here

        if (!decodedBasePath.equals(encodedBasePath)) {
            throw new ContainerException("The servlet context path and/or the " +
                    "servlet path contain characters that are percent enocded");
        }

        final URI 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 = "";
        }

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

        service(baseUri, requestUri, request, response);
    }
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.