/** * The default behavior of this method is to return getParameterNames() * on the wrapped request object. */ public Enumeration getParameterNames() { return this.request.getParameterNames(); }
public static String dumpRequestParams(ServletRequest request) { StringBuilder sb = new StringBuilder(); Enumeration<?> en = request.getParameterNames(); while (en.hasMoreElements()) { String name = (String) en.nextElement(); sb.append("[" + name + "]: " + request.getParameter(name) + '\n'); } return sb.toString(); }
public static TreeMap<String, String> getParameterMap(ServletRequest request) { Objects.requireNonNull(request, "request is null."); TreeMap<String, String> map = new TreeMap<>(); Enumeration enu = request.getParameterNames(); while (enu.hasMoreElements()) { String paraName = (String) enu.nextElement(); map.put(paraName, request.getParameter(paraName)); } return map; }
Enumeration<String> paramNames = request.getParameterNames(); Map<String, Object> params = new TreeMap<>(); if (prefix == null) {
Enumeration<String> paramNames = request.getParameterNames(); Map<String, Object> params = new TreeMap<>(); if (prefix == null) {
Enumeration names = request.getParameterNames();
@Test public void getParameterNames() throws Exception { this.request.addParameter("name1", "value1"); this.request.addParameter("name2", "value2"); this.request.setContent("name1=value1&name3=value3&name4=value4".getBytes("ISO-8859-1")); this.filter.doFilter(this.request, this.response, this.filterChain); List<String> names = Collections.list(this.filterChain.getRequest().getParameterNames()); assertNotSame("Request not wrapped", this.request, this.filterChain.getRequest()); assertEquals(Arrays.asList("name1", "name2", "name3", "name4"), names); }
/** * The default behavior of this method is to return getParameterNames() * on the wrapped request object. */ public Enumeration<String> getParameterNames() { return this.request.getParameterNames(); }
/** * The default behavior of this method is to return getParameterNames() * on the wrapped request object. */ public Enumeration<String> getParameterNames() { return this.request.getParameterNames(); }
protected Iterator<String> keysImpl() { @SuppressWarnings("unchecked") Enumeration<String> names = request.getParameterNames(); return names == null ? null : CollectionUtil.iterator(names); } }
@Override public int doStartTag() throws JspException { StringBuilder query = new StringBuilder(); query.append(param).append("=").append(value); for (String name : Collections.list(pageContext.getRequest().getParameterNames())) { if (!param.equals(name)) { query.append("&").append(StringEscapeUtils.escapeHtml4(name)).append("=") .append(StringEscapeUtils.escapeHtml4( ServletRequestUtils.getStringParameter(pageContext.getRequest(), name, ""))); } } try { pageContext.getOut().print(query); } catch (IOException e) { logger.debug("Exception printing query string to JspWriter", e); throw new JspException(e); } return EVAL_BODY_INCLUDE; }
@Override public int doStartTag() throws JspException { boolean getSize = ServletRequestUtils.getBooleanParameter(pageContext.getRequest(), param, false); StringBuilder query = new StringBuilder(); query.append(param).append("=").append(!getSize); String encoding = pageContext.getResponse().getCharacterEncoding(); for (String name : Collections.list(pageContext.getRequest().getParameterNames())) { if (!param.equals(name)) { try { String value = ServletRequestUtils.getStringParameter(pageContext.getRequest(), name, ""); String encodedValue = URLEncoder.encode(value, encoding); query.append("&").append(name).append("=").append(encodedValue); } catch (UnsupportedEncodingException e) { throw new JspException(e); } } } try { pageContext.getOut().print(query); } catch (IOException e) { logger.debug("Exception printing query string to JspWriter", e); throw new JspException(e); } return EVAL_BODY_INCLUDE; }
/** * The default behavior of this method is to return getParameterNames() * on the wrapped request object. */ public Enumeration getParameterNames() { return this.request.getParameterNames(); }
/** * The default behavior of this method is to return getParameterNames() * on the wrapped request object. */ public Enumeration<String> getParameterNames() { return this.request.getParameterNames(); }
/** * The default behavior of this method is to return getParameterNames() * on the wrapped request object. */ public Enumeration<String> getParameterNames() { return this.request.getParameterNames(); }
/** * The default behavior of this method is to return getParameterNames() on * the wrapped request object. */ @Override public Enumeration<String> getParameterNames() { return this.request.getParameterNames(); }
/** * The default behavior of this method is to return getParameterNames() * on the wrapped request object. */ public Enumeration<String> getParameterNames() { return this.request.getParameterNames(); }
/** * The default behavior of this method is to return getParameterNames() * on the wrapped request object. */ public Enumeration getParameterNames() { return this.request.getParameterNames(); }
/** * The default behavior of this method is to return getParameterNames() on * the wrapped request object. */ @Override public Enumeration<String> getParameterNames() { return this.request.getParameterNames(); }
public static void introspect(Object bean, ServletRequest request) throws JasperException { Enumeration<String> e = request.getParameterNames(); while ( e.hasMoreElements() ) { String name = e.nextElement(); String value = request.getParameter(name); introspecthelper(bean, name, value, request, name, true); } } // __end introspectMethod