Ejemplo n.º 1
0
 protected void logParams() {
   Enumeration en = req.getParameterNames();
   while (en.hasMoreElements()) {
     String name = (String) en.nextElement();
     String vals[];
     String dispval;
     if (StringUtil.indexOfIgnoreCase(name, "passw") >= 0) {
       dispval = req.getParameter(name).length() == 0 ? "" : "********";
     } else if (log.isDebug2() && (vals = req.getParameterValues(name)).length > 1) {
       dispval = StringUtil.separatedString(vals, ", ");
     } else {
       dispval = req.getParameter(name);
     }
     log.debug(name + " = " + dispval);
   }
 }
Ejemplo n.º 2
0
 /**
  * Return the request parameters as a Map<String,String>. Only the first value of multivalued
  * parameters is included.
  */
 Map<String, String> getParamsAsMap() {
   Map<String, String> map = new HashMap<String, String>();
   for (Enumeration en = req.getParameterNames(); en.hasMoreElements(); ) {
     String name = (String) en.nextElement();
     map.put(name, req.getParameter(name));
   }
   return map;
 }
Ejemplo n.º 3
0
 /**
  * Return the request parameters as a Properties. Only the first value of multivalued parameters
  * is included.
  */
 Properties getParamsAsProps() {
   Properties props = new Properties();
   for (Enumeration en = req.getParameterNames(); en.hasMoreElements(); ) {
     String name = (String) en.nextElement();
     props.setProperty(name, req.getParameter(name));
   }
   return props;
 }
Ejemplo n.º 4
0
 public String getParameter(String name) {
   String val = req.getParameter(name);
   if (val == null && multiReq != null) {
     val = multiReq.getString(name);
   }
   if (val == null) {
     return null;
   }
   val = StringUtils.strip(val, " \t");
   //     if (StringUtil.isNullString(val)) {
   if ("".equals(val)) {
     return null;
   }
   return val;
 }
Ejemplo n.º 5
0
 protected boolean hasNoRoleParsm(String roleName) {
   String noRoleParam = noRoleParams.get(roleName);
   return (noRoleParam != null && !StringUtil.isNullString(req.getParameter(noRoleParam)));
 }