Examples of FreezableMutableURI


Examples of org.apache.beehive.netui.core.urls.FreezableMutableURI

        if (urlConfig != null) {
            encoded = !urlConfig.isUrlEncodeUrls();
        }

        FreezableMutableURI uri = new FreezableMutableURI();
        uri.setEncoding( response.getCharacterEncoding() );
        uri.setURI( path, encoded );

        if ( params != null )
        {
            uri.addParameters( params, false );
        }

        if ( fragment != null )
        {
            uri.setFragment( uri.encode( fragment ) );
        }

        URIContext uriContext = URIContextFactory.getInstance( forXML );
        if ( uri.isAbsolute() )
        {
            return uri.getURIString( uriContext );
        }

        if ( path.length() != 0 && path.charAt( 0 ) !=  '/' )
        {
            String reqUri = request.getRequestURI();
            String reqPath = reqUri.substring( 0, reqUri.lastIndexOf( '/' ) + 1 );
            uri.setPath( reqPath + uri.getPath() );
        }

        boolean needsToBeSecure = needsToBeSecure( servletContext, request, uri.getPath(), true );
        URLRewriterService.rewriteURL( servletContext, request, response, uri, urlType, needsToBeSecure );
        String key = getURLTemplateKey( urlType, needsToBeSecure );

        return URLRewriterService.getTemplatedURL( servletContext, request, uri, key, uriContext );
    }
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.