public Enumeration getParameterNames() { handleQueryParameters(); // Slow - the original code if( currentChild!=null ) { currentChild.merge(); return currentChild.paramHashStringArray.keys(); } // merge in child return paramHashStringArray.keys(); }
/** Combine the parameters from parent with our local ones */ private void merge() { // recursive if( debug > 0 ) { log("Before merging " + this + " " + parent + " " + didMerge ); log( paramsAsString()); } // Local parameters first - they take precedence as in spec. handleQueryParameters(); // we already merged with the parent if( didMerge ) return; // we are the top level if( parent==null ) return; // Add the parent props to the child ( lower precedence ) parent.merge(); Hashtable<String,String[]> parentProps=parent.paramHashStringArray; merge2( paramHashStringArray , parentProps); didMerge=true; if(debug > 0 ) log("After " + paramsAsString()); }
public String[] getParameterValues(String name) { handleQueryParameters(); // sub-request if( currentChild!=null ) { currentChild.merge(); return (String[])currentChild.paramHashStringArray.get(name); } // no "facade" String values[]=(String[])paramHashStringArray.get(name); return values; }