Package org.apache.pluto.container

Examples of org.apache.pluto.container.ResourceURLProvider


    }
   
    protected String getRedirectLocation(String location)
    {
        ArgumentUtility.validateNotEmpty("location", location);
        ResourceURLProvider provider = getResponseContext().getResourceURLProvider();

        if (location.indexOf("://") != -1)
        {
            provider.setAbsoluteURL(location);
        }
        else
        {
            provider.setFullPath(location);
        }
        location = getServletResponse().encodeRedirectURL(provider.toString());
        if (location.indexOf("/") == -1)
        {
            throw new IllegalArgumentException("There is a relative path given, an IllegalArgumentException must be thrown.");
        }
        return location;
View Full Code Here


        if (path.indexOf("://") == -1 && !path.startsWith("/"))
        {
            throw new IllegalArgumentException("only absolute URLs or full path URIs are allowed");
        }
               
        ResourceURLProvider provider = responseContext.getResourceURLProvider();
        if (path.indexOf("://") != -1) {
            provider.setAbsoluteURL(path);
        } else {
            provider.setFullPath(path);
        }
        return getServletResponse().encodeURL(provider.toString());
    }
View Full Code Here

TOP

Related Classes of org.apache.pluto.container.ResourceURLProvider

Copyright © 2018 www.massapicom. 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.