Examples of RedirectException


Examples of org.apache.cocoon.response.RedirectException

                        // pass the request object to the producer and produce the initial
                        // Document
                        if (PROFILE) profiler.startEvent (requestMarker, producer.getClass ());
                        Document document = producer.getDocument(request);
                        if (PROFILE) profiler.finishEvent (requestMarker, producer.getClass ());
                        if (((HttpServletResponseFacade) response).hasRedirected) throw new RedirectException ();

                        if (LOG) logger.log(this, "Document produced", Logger.DEBUG);

                        // See if disable caching processing instruction exists
                        if (Utils.getFirstPI (document, DISABLE_CACHING_PI, true) != null) {
                            page.setChangeable (UNCACHEABLE);
                        }

                        // pass needed parameters to the processor pipeline
                        Hashtable environment = new Hashtable();
                        environment.put("path", producer.getPath(request));
                        environment.put("browser", browsers.map(agent));
                        environment.put("request", request);
                        environment.put("response", response);
                        if (servletContext != null) environment.put("context", servletContext);

                        // process the document through the document processors
                        for (int processNum = 0; true; processNum++) {
                            Processor processor = processors.getProcessor(document);
                            if (processor == null) break;
                            String processDesc = processor.getClass ().getName () + "-" + processNum;
                            if (PROFILE) profiler.startEvent (requestMarker, processDesc);
                            document = processor.process(document, environment);
                            page.setChangeable(processor);
                            if (PROFILE) profiler.finishEvent (requestMarker, processDesc);
                            if (((HttpServletResponseFacade) response).hasRedirected) throw new RedirectException ();
                            if (LOG) logger.log(this, "Document processed", Logger.DEBUG);
                        }

                        // get the right formatter for the page
                        Formatter formatter = formatters.getFormatter(document);
View Full Code Here

Examples of org.apache.commons.httpclient.RedirectException

                redirects++;
                    // See if the redirect limit is set on the client. If not, use 10.
                if (redirects > client.getParams().getIntParameter(HttpClientParams.MAX_REDIRECTS, 10))
                {
                  // Too many redirects. Something bad happened.
                  throw new RedirectException("Too many redirects");
                }
               
                    HttpConnectionManager newConnMgr = null;
               
                if (statusCode == 301) {
View Full Code Here

Examples of org.apache.http.client.RedirectException

        HttpParams params = request.getParams();
        if (HttpClientParams.isRedirecting(params) &&
                this.redirectHandler.isRedirectRequested(response, context)) {

            if (redirectCount >= maxRedirects) {
                throw new RedirectException("Maximum redirects ("
                        + maxRedirects + ") exceeded");
            }
            redirectCount++;
           
            URI uri = this.redirectHandler.getLocationURI(response, context);
View Full Code Here

Examples of org.apache.http.client.RedirectException

        HttpParams params = request.getParams();
        if (HttpClientParams.isRedirecting(params) &&
                this.redirectStrategy.isRedirected(request, response, context)) {

            if (redirectCount >= maxRedirects) {
                throw new RedirectException("Maximum redirects ("
                        + maxRedirects + ") exceeded");
            }
            redirectCount++;

            // Virtual host cannot be used any longer
View Full Code Here

Examples of org.apache.http.client.RedirectException

            HttpRoute route = this.mainRequest.getRoute();
            RequestWrapper request = this.mainRequest.getRequest();

            int maxRedirects = this.params.getIntParameter(ClientPNames.MAX_REDIRECTS, 100);
            if (this.redirectCount >= maxRedirects) {
                throw new RedirectException("Maximum redirects ("
                        + maxRedirects + ") exceeded");
            }
            this.redirectCount++;

            HttpUriRequest redirect = this.redirectStrategy.getRedirect(
View Full Code Here

Examples of org.apache.http.client.RedirectException

            final HttpRequest currentRequest = state.getCurrentRequest();
            final HttpResponse currentResponse = state.getCurrentResponse();
            if (this.redirectStrategy.isRedirected(currentRequest, currentResponse, localContext)) {
                final int maxRedirects = config.getMaxRedirects() >= 0 ? config.getMaxRedirects() : 100;
                if (state.getRedirectCount() >= maxRedirects) {
                    throw new RedirectException("Maximum redirects (" + maxRedirects + ") exceeded");
                }
                state.incrementRedirectCount();
                final HttpUriRequest redirect = this.redirectStrategy.getRedirect(currentRequest, currentResponse,
                    localContext);
                state.setRedirect(redirect);
View Full Code Here

Examples of org.apache.http.client.RedirectException

        HttpParams params = request.getParams();
        if (HttpClientParams.isRedirecting(params) &&
                this.redirectHandler.isRedirectRequested(response, context)) {

            if (redirectCount >= maxRedirects) {
                throw new RedirectException("Maximum redirects ("
                        + maxRedirects + ") exceeded");
            }
            redirectCount++;
           
            URI uri = this.redirectHandler.getLocationURI(response, context);
View Full Code Here

Examples of org.apache.http.client.RedirectException

        HttpParams params = request.getParams();
        if (HttpClientParams.isRedirecting(params) &&
                this.redirectStrategy.isRedirected(request, response, context)) {

            if (redirectCount >= maxRedirects) {
                throw new RedirectException("Maximum redirects ("
                        + maxRedirects + ") exceeded");
            }
            redirectCount++;

            // Virtual host cannot be used any longer
View Full Code Here

Examples of org.apache.http.client.RedirectException

            HttpRoute route = this.mainRequest.getRoute();
            RequestWrapper request = this.mainRequest.getRequest();

            int maxRedirects = this.params.getIntParameter(ClientPNames.MAX_REDIRECTS, 100);
            if (this.redirectCount >= maxRedirects) {
                throw new RedirectException("Maximum redirects ("
                        + maxRedirects + ") exceeded");
            }
            this.redirectCount++;

            HttpUriRequest redirect = this.redirectStrategy.getRedirect(
View Full Code Here

Examples of org.apache.http.client.RedirectException

        HttpParams params = request.getParams();
        if (HttpClientParams.isRedirecting(params) &&
                this.redirectHandler.isRedirectRequested(response, context)) {

            if (redirectCount >= maxRedirects) {
                throw new RedirectException("Maximum redirects ("
                        + maxRedirects + ") exceeded");
            }
            redirectCount++;
           
            URI uri = this.redirectHandler.getLocationURI(response, context);
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.