Example usage for javax.servlet.http HttpServletRequest getParameterMap

List of usage examples for javax.servlet.http HttpServletRequest getParameterMap

Introduction

In this page you can find the example usage for javax.servlet.http HttpServletRequest getParameterMap.

Prototype

public Map<String, String[]> getParameterMap();

Source Link

Document

Returns a java.util.Map of the parameters of this request.

Usage

From source file:cec.easyshop.storefront.filters.btg.RequestParamsBtgFilter.java

@Override
protected AbstractBTGRuleDataEvent getEvent(final HttpServletRequest request) {
    RequestParametersUsedBTGRuleDataEvent result = null;
    final Map<String, String[]> params = request.getParameterMap();
    if (!MapUtils.isEmpty(params)) {
        result = new RequestParametersUsedBTGRuleDataEvent(params);
    }//from  w w w.j  av a2  s  . c  o m
    return result;
}

From source file:formatter.handler.post.FormatterPostHandler.java

/**
 * Parse the import params from the request
 * @param request the http request/*from w  ww.j  a v  a2  s.  c  om*/
 */
void parseImportParams(HttpServletRequest request) {
    Map tbl = request.getParameterMap();
    Set<String> keys = tbl.keySet();
    Iterator<String> iter = keys.iterator();
    while (iter.hasNext()) {
        String key = iter.next();
        String[] values = (String[]) tbl.get(key);
        for (int i = 0; i < values.length; i++)
            processField(key, values[i]);
    }
}

From source file:com.tdclighthouse.commons.utils.beans.QueryBean.java

/**
 * @param request//  ww  w  .  j  a  va2 s. c  o  m
 *            the request to set
 */
@SuppressWarnings("unchecked")
public void setRequest(HttpServletRequest request) {
    this.request = request;
    map.putAll(request.getParameterMap());
}

From source file:com.graphhopper.http.GHBaseServlet.java

protected String[] getParams(HttpServletRequest req, String string) {
    String[] l = req.getParameterMap().get(string);
    if (l != null && l.length > 0) {
        return l;
    }/*  w w  w.j a  v  a  2  s .c o  m*/
    return new String[0];
}

From source file:com.devnexus.ting.web.controller.AmazonCallbackController.java

private String formatHttpRequest(HttpServletRequest request) {

    StringBuilder builder = new StringBuilder();

    for (Object name : request.getParameterMap().keySet()) {
        builder.append(name).append(":").append(((String[]) request.getParameterMap().get(name))[0]);
    }// ww w  .jav a 2  s  .  co m

    return builder.toString();

}

From source file:org.jdal.web.log.RequestParamLogFilter.java

@Override
public void beforeRequest(HttpServletRequest request, String message) {
    super.beforeRequest(request, message);
    Map parameters = request.getParameterMap();

    if (log.isDebugEnabled())
        log.debug("Request Parameters:\n " + getParameterString(parameters));
}

From source file:com.graphhopper.http.GHBaseServlet.java

protected String getParam(HttpServletRequest req, String string, String _default) {
    String[] l = req.getParameterMap().get(string);
    if (l != null && l.length > 0)
        return l[0];

    return _default;
}

From source file:com.dcampus.common.web.BaseController.java

protected void populate(Object obj, HttpServletRequest request) {
    try {//w w  w. j  a  v  a 2 s  . c o m
        BeanUtils.populate(obj, request.getParameterMap());
    } catch (Exception e) {
        //   e.printStackTrace();
    }
}

From source file:edu.cornell.mannlib.vitro.webapp.controller.admin.WaitForBackgroundThreadsController.java

/**
 * If there is a "return" parameter and a "referer" header, return the
 * referer URL. Otherwise, return null.//from  w  w w  . java  2 s  .  co m
 */
private String figureRedirect(HttpServletRequest req) {
    if (!req.getParameterMap().containsKey(PARAMETER_RETURN)) {
        return null;
    }

    Enumeration<?> referers = req.getHeaders(HEADER_REFERER);
    if ((referers == null) || (!referers.hasMoreElements())) {
        return null;
    }

    String redirect = (String) referers.nextElement();
    log.debug("Redirect is to '" + redirect + "'");
    return redirect;
}

From source file:net.sourceforge.fenixedu.presentationTier.Action.resourceAllocationManager.ManageExecutionCourseDA.java

private CourseLoad getCourseLoadFromParameter(final HttpServletRequest request) {
    final String idString = request.getParameterMap().containsKey("courseLoadID")
            ? request.getParameter("courseLoadID")
            : null;/*from  w w w  .  j  av a2  s.  c  om*/
    return FenixFramework.getDomainObject(idString);
}