Examples of ParameterMap


Examples of org.apache.catalina.util.ParameterMap

        requestedSessionCookie = false;
        requestedSessionId = null;
        requestedSessionURL = false;

        if (Globals.IS_SECURITY_ENABLED || Connector.RECYCLE_FACADES) {
            parameterMap = new ParameterMap();
        } else {
            parameterMap.setLocked(false);
            parameterMap.clear();
        }
View Full Code Here

Examples of org.apache.catalina.util.ParameterMap

        requestedSessionCookie = false;
        requestedSessionId = null;
        requestedSessionURL = false;

        if (Constants.SECURITY || Connector.RECYCLE_FACADES) {
            parameterMap = new ParameterMap();
        } else {
            parameterMap.setLocked(false);
            parameterMap.clear();
        }
View Full Code Here

Examples of org.apache.catalina.util.ParameterMap

        if (parameters != null) {
            parameters.setLocked(false);
            parameters.clear();
        } else {
            parameters = new ParameterMap();
        }

    }
View Full Code Here

Examples of org.apache.catalina.util.ParameterMap

    protected void parseParameters() {

        if (parsed)
            return;

        ParameterMap results = parameters;
        if (results == null)
            results = new ParameterMap();
        results.setLocked(false);

        String encoding = getCharacterEncoding();
        if (encoding == null)
            encoding = "ISO-8859-1";

        // Parse any parameters specified in the query string
        String queryString = getQueryString();
        try {
            RequestUtil.parseParameters(results, queryString, encoding);
        } catch (UnsupportedEncodingException e) {
            ;
        }

        // Parse any parameters specified in the input stream
        String contentType = getContentType();
        if (contentType == null)
            contentType = "";
        int semicolon = contentType.indexOf(';');
        if (semicolon >= 0) {
            contentType = contentType.substring(0, semicolon).trim();
        } else {
            contentType = contentType.trim();
        }
        if ("POST".equals(getMethod()) && (getContentLength() > 0)
            && (this.stream == null)
            && "application/x-www-form-urlencoded".equals(contentType)) {

            try {
                int max = getContentLength();
                int len = 0;
                byte buf[] = new byte[getContentLength()];
                ServletInputStream is = getInputStream();
                while (len < max) {
                    int next = is.read(buf, len, max - len);
                    if (next < 0 ) {
                        break;
                    }
                    len += next;
                }
                is.close();
                if (len < max) {
                    // FIX ME, mod_jk when sending an HTTP POST will sometimes
                    // have an actual content length received < content length.
                    // Checking for a read of -1 above prevents this code from
                    // going into an infinite loop.  But the bug must be in mod_jk.
                    // Log additional data when this occurs to help debug mod_jk
                    StringBuffer msg = new StringBuffer();
                    msg.append("HttpRequestBase.parseParameters content length mismatch\n");
                    msg.append("  URL: ");
                    msg.append(getRequestURL());
                    msg.append(" Content Length: ");
                    msg.append(max);
                    msg.append(" Read: ");
                    msg.append(len);
                    msg.append("\n  Bytes Read: ");
                    if ( len > 0 ) {
                        msg.append(new String(buf,0,len));
                    }
                    log(msg.toString());
                    throw new RuntimeException
                        (sm.getString("httpRequestBase.contentLengthMismatch"));
                }
                RequestUtil.parseParameters(results, buf, encoding);
            } catch (UnsupportedEncodingException ue) {
                ;
            } catch (IOException e) {
                throw new RuntimeException
                        (sm.getString("httpRequestBase.contentReadFail") +
                         e.getMessage());
            }
        }

        // Store the final results
        results.setLocked(true);
        parsed = true;
        parameters = results;

    }
View Full Code Here

Examples of org.apache.empire.jsf2.utils.ParameterMap

    public static ParameterMap getParameterMap(final FacesContext fc)
    {
        Map<String, Object> sm = fc.getExternalContext().getSessionMap();
        Object pm = sm.get(PARAMETER_MAP_ATTRIBUTE);
        if (pm==null)
        {   pm = new ParameterMap();
            sm.put(PARAMETER_MAP_ATTRIBUTE, pm);
        }
        return (ParameterMap)pm;
    }
View Full Code Here

Examples of org.apache.empire.jsf2.utils.ParameterMap

    }
    */

    private static String encodeActionParam(String action)
    {
        ParameterMap pm = FacesUtils.getParameterMap(FacesUtils.getContext());
        if (pm==null)
            return action;
        return pm.put(ACTION_PARAMETER_TYPE, action, true);
    }
View Full Code Here

Examples of org.apache.empire.jsf2.utils.ParameterMap

        return pm.put(ACTION_PARAMETER_TYPE, action, true);
    }
   
    public static String decodeActionParam(String param)
    {
        ParameterMap pm = FacesUtils.getParameterMap(FacesUtils.getContext());
        if (pm==null)
            return param;
        String action = StringUtils.toString(pm.get(ACTION_PARAMETER_TYPE, param));
        if (action==null)
            log.warn("no action available for param {}.", param);
        return action;
    }
View Full Code Here

Examples of org.apache.empire.jsf2.utils.ParameterMap

       
        // if (this.action==INVALID_ACTION)
        //      return null;

        // Generate key
        ParameterMap pm = FacesUtils.getParameterMap(FacesUtils.getContext());
        String actionParam = (pm!=null ? pm.encodeString(action) : action);
        return actionParam;
    }
View Full Code Here

Examples of org.apache.ibatis.mapping.ParameterMap

    final TypeHandlerRegistry registry = config.getTypeHandlerRegistry();
    final SqlSource sqlSource = new StaticSqlSource(config, "SELECT b.id, b.author_id, b.title, a.username, a.password, a.email, a.bio" +
        " FROM blog b" +
        " INNER JOIN author a ON b.author_id = a.id" +
        " WHERE b.id = ?");
    final ParameterMap parameterMap = new ParameterMap.Builder(config, "defaultParameterMap", int.class,
        new ArrayList<ParameterMapping>() {
          {
            add(new ParameterMapping.Builder(config, "id", registry.getTypeHandler(int.class)).build());
          }
        }).build();
View Full Code Here

Examples of org.apache.struts.beanaction.httpmap.ParameterMap

        return cookieMap;
    }

    public Map getParameterMap() {
        if (parameterMap == null) {
            parameterMap = new ParameterMap(request);
        }
        return parameterMap;
    }
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.