Package org.jayasoft.woj.server.servlet

Examples of org.jayasoft.woj.server.servlet.URLRedirectException


            if (f.exists() && f.isDirectory()) {
                // Requested url is a directory
                // We first look if we have a redirect file
                String forward = getForward(ref);
                if (forward != null) {
                    throw new URLRedirectException(forward);
                }
                // There is no redirection, we look for standard files to show (index.html, ...)
                contentReader = getStandardFileReader(f);
                if (contentReader==null) {
                    if (ref.getReferencePath().endsWith("/")) {
                        contentReader = getDirectoryReader(ref, f);
                    } else {
                        throw new UnknwownContentException(f.getName() + " , it doesn't end with a trailing slash");
                    }
                }
                if (contentReader==null) {
                    contentReader = getErrorNoContentReader(ref, f);
                }
            } else {
                if (ref.getReferencePath().endsWith("/")) {
                    // in case we are looking for javadocs or sources that do not exists
                    contentReader = getErrorNoContentReader(ref, f);
                } else if (!f.exists()) {
                    // we check if we have a forward instruction
                    String forward = getForward(ref);
                    if (forward != null) {
                        throw new URLRedirectException(forward);
                    } else {
                        LOGGER.info("File " + fileToRead + " doesn't exist in this server, we dispatch.");
                        dispatch.dispatch(uak, ref, redirected);
                    }
                } else {
View Full Code Here

TOP

Related Classes of org.jayasoft.woj.server.servlet.URLRedirectException

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.