Examples of HttpRedirect


Examples of org.apache.excalibur.instrument.manager.http.server.HTTPRedirect

        {
            // Sample no longer exists, go back to the parent instrument.
            int pos = name.lastIndexOf( '.' );
            if ( pos >= 0 )
            {
                throw new HTTPRedirect(
                    "instrumentable.html?name=" + urlEncode( name.substring( 0,  pos ) ) );
            }
            else
            {
                throw new HTTPRedirect( "instrument-manager.html" );
            }
        }
       
        out.println( "<html>" );
        out.println( "<head><title>" + desc.getDescription() + "</title></head>" );
View Full Code Here

Examples of org.glassfish.grizzly.config.dom.HttpRedirect

    @Override
    public void configure(ServiceLocator habitat, NetworkListener networkListener,
            ConfigBeanProxy configuration) {
       
        if (configuration instanceof HttpRedirect) {
            final HttpRedirect httpRedirectConfig = (HttpRedirect) configuration;
            int port = Integer.parseInt(httpRedirectConfig.getPort());
            redirectPort = port != -1 ? port : null;
            secure = Boolean.parseBoolean(httpRedirectConfig.getSecure());
        } else {
            // Retained for backwards compatibility with legacy redirect declarations.
        }
    }
View Full Code Here

Examples of org.glassfish.grizzly.config.dom.HttpRedirect

        }

        try {
            ConfigSupport.apply(new SingleConfigCode<Protocol>() {
                public Object run(Protocol param) throws TransactionFailure {
                    HttpRedirect httpRedirect = param.createChild(HttpRedirect.class);
                    httpRedirect.setPort(port);
                    httpRedirect.setSecure(secure);
                    param.setHttpRedirect(httpRedirect);
                    return httpRedirect;
                }
            }, protocol);
        } catch (TransactionFailure e) {
View Full Code Here

Examples of org.glassfish.grizzly.config.dom.HttpRedirect

        }

        try {
            ConfigSupport.apply(new SingleConfigCode<Protocol>() {
                public Object run(Protocol param) throws TransactionFailure {
                    HttpRedirect httpRedirect = param.createChild(HttpRedirect.class);
                    httpRedirect.setPort(port);
                    httpRedirect.setSecure(secure);
                    param.setHttpRedirect(httpRedirect);
                    return httpRedirect;
                }
            }, protocol);
        } catch (TransactionFailure e) {
View Full Code Here

Examples of org.kohsuke.stapler.HttpRedirect

            } finally {
                bc.commit();
            }
        } else
        if (req.hasParameter("add"))
            return new HttpRedirect("addSite");

        return new HttpRedirect("./sites");
    }
View Full Code Here

Examples of org.kohsuke.stapler.HttpRedirect

            ProxyConfiguration.getXmlFile().delete();
        } else {
            jenkins.proxy = pc;
            jenkins.proxy.save();
        }
        return new HttpRedirect("advanced");
    }
View Full Code Here

Examples of org.kohsuke.stapler.HttpRedirect

            // Parse the request
            FileItem fileItem = (FileItem) upload.parseRequest(req).get(0);
            String fileName = Util.getFileName(fileItem.getName());
            if("".equals(fileName)){
                return new HttpRedirect("advanced");
            }
            // we allow the upload of the new jpi's and the legacy hpi's 
            if(!fileName.endsWith(".jpi") && !fileName.endsWith(".hpi")){
                throw new Failure(hudson.model.Messages.Hudson_NotAPlugin(fileName));
            }
            final String baseName = FilenameUtils.getBaseName(fileName);
            fileItem.write(new File(rootDir, baseName + ".jpi")); // rename all new plugins to *.jpi
            fileItem.delete();

            PluginWrapper existing = getPlugin(baseName);
            if (existing!=null && existing.isBundled){
                existing.doPin();
            }

            pluginUploaded = true;

            return new HttpRedirect(".");
        } catch (IOException e) {
            throw e;
        } catch (Exception e) {// grrr. fileItem.write throws this
            throw new ServletException(e);
        }
View Full Code Here

Examples of org.kohsuke.stapler.HttpRedirect

     */
    @CLIMethod(name="delete-node")
    public HttpResponse doDoDelete() throws IOException {
        checkPermission(DELETE);
        Jenkins.getInstance().removeNode(getNode());
        return new HttpRedirect("..");
    }
View Full Code Here

Examples of org.kohsuke.stapler.HttpRedirect

        Jenkins.checkGoodName(name);
       
        logRecorders.put(name,new LogRecorder(name));

        // redirect to the config screen
        return new HttpRedirect(name+"/configure");
    }
View Full Code Here

Examples of org.kohsuke.stapler.HttpRedirect

        if(level.equals("inherit"))
            lv = null;
        else
            lv = Level.parse(level.toUpperCase(Locale.ENGLISH));
        Logger.getLogger(name).setLevel(lv);
        return new HttpRedirect("levels");
    }
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.