Examples of UrlRewriter


Examples of com.volantis.mcs.integration.URLRewriter

            protocol = applicationContext.getProtocol();

            // The protocol needs to know what the context is.
            protocol.setMarinerPageContext(this);

            URLRewriter urlRewriter = volantisBean.getURLRewriter();

            requestURL = urlRewriter.mapToMarinerURL(requestContext,
                                                     marinerRequestURL);

            // The request URL must not be modified.
            requestURL.makeReadOnly();
View Full Code Here

Examples of com.volantis.mcs.integration.URLRewriter

    }



    public URLRewriter getSessionURLRewriter() {
        return new URLRewriter() {
            public MarinerURL mapToExternalURL(MarinerRequestContext context,
                                               MarinerURL url) {
                return url;
            }
View Full Code Here

Examples of com.volantis.mcs.integration.URLRewriter

        // Get the URLRewriter to use to encode session information in the
        // URL and use it, do this before stripping the URL as otherwise it is
        // not done properly.
        MarinerRequestContext requestContext = context.getRequestContext();
        URLRewriter sessionURLRewriter = context.getSessionURLRewriter();
        MarinerURL sessionURL
            = sessionURLRewriter.mapToExternalURL(requestContext,
                                                  documentURL);

        if (logger.isDebugEnabled()) {
            logger.debug("Encoded url is "
                         + sessionURL.getExternalForm());
View Full Code Here

Examples of com.volantis.mcs.integration.URLRewriter

       
        // Get the URLRewriter to use to encode session information in the
        // URL and use it, do this before stripping the URL as otherwise it is
        // not done properly.
        MarinerRequestContext requestContext = pageContext.getRequestContext();
        URLRewriter sessionURLRewriter = pageContext.getSessionURLRewriter();
        MarinerURL sessionURL
            = sessionURLRewriter.mapToExternalURL(requestContext,
                           pageContext.getRequestURL(true));

        if (logger.isDebugEnabled()) {
            logger.debug("Encoded url is "
                         + sessionURL.getExternalForm());
        }

        // As the link we generate is always back to this page we can reduce the
        // overhead by removing the protocol, authority and all but the last part
        // of the path. We do this before URL rewriting as we have no idea what
        // the URL will look like afterwards.
        sessionURL.setProtocol(null);
        sessionURL.setAuthority(null);
        String path = sessionURL.getPath();
        int index = path.lastIndexOf('/');
        if (index != -1) {
            path = path.substring(index + 1);
            sessionURL.setPath(path);
        }

        if (logger.isDebugEnabled()) {
            logger.debug("Relative url is "
                         + sessionURL.getExternalForm());
        }

        // perform any URL rewriting that might be needed
        URLRewriter urlRewriter
            = pageContext.getVolantisBean().getURLRewriter();
        MarinerURL externalURL =
            urlRewriter.mapToExternalURL(requestContext, sessionURL);
           
        // Split the URL up
        SessionIdentifierSearcher searcher
             = SessionIdentifierSearcherFactory.create();           
        SessionIdentifierURL splitURL
View Full Code Here

Examples of com.volantis.mcs.integration.URLRewriter

        }

        // Get the URLRewriter to use to encode session information in the
        // URL and use it.
        MarinerRequestContext requestContext = pageContext.getRequestContext();
        URLRewriter sessionURLRewriter = pageContext.getSessionURLRewriter();
        MarinerURL sessionURL
                = sessionURLRewriter.mapToExternalURL(requestContext,
                                                      rootPageURL);

        // perform any URL rewriting that may be required by an external plugin
        PageURLRewriter urlRewriter = pageContext.getVolantisBean().
                getLayoutURLRewriter();
View Full Code Here

Examples of com.volantis.mcs.integration.URLRewriter

        }

        // Get the URLRewriter to use to encode session information in the
        // URL and use it.
        MarinerRequestContext requestContext = context.getRequestContext();
        URLRewriter sessionURLRewriter = context.getSessionURLRewriter();
        marinerURL = sessionURLRewriter.mapToExternalURL(requestContext,
                                                         marinerURL);

        // perform any URL rewriting that may be required by an external plugin
        PageURLRewriter urlRewriter = context.getVolantisBean().
            getLayoutURLRewriter();
View Full Code Here

Examples of com.volantis.mcs.integration.URLRewriter

     */
    protected MarinerURL rewriteFormURL(MarinerURL url) {
        // Get the URLRewriter to use to encode session information in the
        // URL and use it.
        MarinerRequestContext requestContext = context.getRequestContext();
        URLRewriter sessionURLRewriter = context.getSessionURLRewriter();

        MarinerURL sessionURL = sessionURLRewriter.mapToExternalURL
            (requestContext, url);

        // perform any URL rewriting that may be required by an external
        // plugin
        PageURLRewriter urlRewriter
View Full Code Here

Examples of org.apache.cocoon.components.source.URLRewriter

                             boolean filterDocumentEvent)
    throws SAXException, IOException, ProcessingException {
        // Test for url rewriting
        if (typeParameters != null
                && typeParameters.getParameter(URLRewriter.PARAMETER_MODE, null) != null) {
            handler = new URLRewriter(typeParameters, handler);
        }

        String mimeTypeHint = null;
        if (typeParameters != null) {
            mimeTypeHint = typeParameters.getParameter("mime-type", mimeTypeHint);
View Full Code Here

Examples of org.apache.cocoon.sunshine.helpers.URLRewriter

        IncludeXMLConsumer filter;
        // Test for url rewriting
        if (typeParameters != null
            && typeParameters.getParameter(URLRewriter.PARAMETER_MODE, null) != null) {
            XMLConsumer consumer = new URLRewriter(typeParameters,
                                                   builder,
                                                   builder);
            filter = new IncludeXMLConsumer(consumer, consumer);
        } else {
            filter = new IncludeXMLConsumer(builder, builder);
View Full Code Here

Examples of org.apache.cocoon.sunshine.helpers.URLRewriter

        long startTime = System.currentTimeMillis();
        // Test for url rewriting
        if (typeParameters != null
            && typeParameters.getParameter(URLRewriter.PARAMETER_MODE, null) != null) {
            XMLConsumer consumer = new URLRewriter(typeParameters,
                                                   contentHandler,
                                                   lexicalHandler);
            contentHandler = consumer;
            lexicalHandler = consumer;
        }
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.