Package org.jboss.dashboard.ui

Examples of org.jboss.dashboard.ui.HTTPSettings


    }

    protected String getParameterMarkup(String name, Object value) {
        StringBuffer sb = new StringBuffer();
        try {
            HTTPSettings webSettings = HTTPSettings.lookup();
            sb.append(URLEncoder.encode(name, webSettings.getEncoding())).append("=").append(URLEncoder.encode(String.valueOf(value), webSettings.getEncoding()));
        } catch (UnsupportedEncodingException e) {
            log.error("Error: ", e);
        }
        return sb.toString();
    }
View Full Code Here


    public final void service(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException {
        if (initSuccess) {
            Factory.doWork(new FactoryWork() {
                public void doWork() {
                    try {
                        HTTPSettings webSettings = HTTPSettings.lookup();
                        request.setCharacterEncoding(webSettings.getEncoding());
                    } catch (UnsupportedEncodingException e) {
                        log.error("Error: ", e);
                    }

                    // Init the request context.
View Full Code Here

    }

    protected String getParameterMarkup(String name, Object value) {
        StringBuffer sb = new StringBuffer();
        try {
            HTTPSettings webSettings = HTTPSettings.lookup();
            sb.append(URLEncoder.encode(name, webSettings.getEncoding())).append("=").append(URLEncoder.encode(String.valueOf(value), webSettings.getEncoding()));
        } catch (UnsupportedEncodingException e) {
            log.error("Error: ", e);
        }
        return sb.toString();
    }
View Full Code Here

        /*
        *  Hack for handling multipart requests.
        */
        String contentType = getRequest().getContentType();
        String method = getRequest().getMethod();
        HTTPSettings webSettings = HTTPSettings.lookup();
        if ("POST".equalsIgnoreCase(method) && contentType != null && contentType.startsWith("multipart") && webSettings.isMultipartProcessing()) {
            log.debug("Found multipart request. Building wrapper");

            String tmpDir = SessionTmpDirFactory.getTmpDir(getRequest());
            if (log.isDebugEnabled())
                log.debug("Extracting to dir " + tmpDir);

            int maxSize = webSettings.getMaxPostSize() * 1024;
            if (log.isDebugEnabled()) {
                log.debug("Max post size is : " + maxSize + " bytes");
                log.debug("Encoding is: " + webSettings.getEncoding());
            }

            try {
                RequestMultipartWrapper wrap = new RequestMultipartWrapper(getRequest(), tmpDir, maxSize, webSettings.getEncoding());
                log.debug("Multipart request parsed: ");
                log.debug("getting files from request");
                ControllerServletHelper.lookup().initThreadLocal(wrap, getResponse());
            }
            catch (IOException ioe) {
View Full Code Here

        this.providerId = providerId;
    }

    public String getId() {
        try {
            HTTPSettings fr = HTTPSettings.lookup();
            return GROUP_PREFFIX + Base64.encode(groupName.getBytes(fr.getEncoding()));
        } catch (UnsupportedEncodingException e) {
            log.error("Error: ", e);
        }
        return GROUP_PREFFIX + Base64.encode(groupName.getBytes());
    }
View Full Code Here

    public final void service(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException {
        if (initSuccess) {
            Factory.doWork(new FactoryWork() {
                public void doWork() {
                    try {
                        HTTPSettings webSettings = HTTPSettings.lookup();
                        request.setCharacterEncoding(webSettings.getEncoding());
                    } catch (UnsupportedEncodingException e) {
                        log.error("Error: ", e);
                    }

                    // Init the request context.
View Full Code Here

        if (currentLang != null) return currentLang;
        return currentLang = getLocaleManager().getCurrentLang();
    }

    protected String getEncoding() {
        HTTPSettings fr = HTTPSettings.lookup();
        return fr.getEncoding();
    }
View Full Code Here

        this.providerId = providerId;
    }

    public String getId() {
        try {
            HTTPSettings fr = HTTPSettings.lookup();
            return GROUP_PREFFIX + Base64.encode(groupName.getBytes(fr.getEncoding()));
        } catch (UnsupportedEncodingException e) {
            log.error("Error: ", e);
        }
        return GROUP_PREFFIX + Base64.encode(groupName.getBytes());
    }
View Full Code Here

TOP

Related Classes of org.jboss.dashboard.ui.HTTPSettings

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.