public String getParameter( String s ) { return _requestContext.getParameter( s ); }
/** * Returns a java.util.Map of the parameters of this request. * Request parameters are extra information sent with the request. For HTTP servlets, parameters are contained * in the query string or posted form data. * * @since 1.3 **/ public Map getParameterMap() { return _requestContext.getParameterMap(); }
/** * * Returns an <code>Enumeration</code> of <code>String</code> * objects containing the names of the parameters contained * in this request. If the request has * no parameters or if the input stream is empty, returns an * empty <code>Enumeration</code>. The input stream is empty * when all the data returned by {@link #getInputStream} has * been read. **/ public Enumeration getParameterNames() { return _requestContext.getParameterNames(); }
_secure = _protocol.endsWith("s" ); _requestContext = new RequestContext( request.getURL() ); String contentTypeHeader = (String) _headers.get( "Content-Type" ); if (contentTypeHeader != null) { _contentType = res[0]; _charset = res[1]; _requestContext.setMessageEncoding( _charset ); _requestContext.setMessageBody( _messageBody );
String[] getParameterValues( String name ) { return (String[]) getParameters().get( name ); }
private Hashtable getParameters() { if (_messageBody != null) { loadParameters( getMessageBodyAsString() ); _messageBody = null; } if (_visibleParameters == null) { if (_parentRequest == null) { _visibleParameters = _parameters; } else { _visibleParameters = new Hashtable(); final Map parameterMap = _parentRequest.getParameterMap(); for (Iterator i = parameterMap.keySet().iterator(); i.hasNext();) { Object key = i.next(); _visibleParameters.put( key, parameterMap.get( key ) ); } for (Enumeration e = _parameters.keys(); e.hasMoreElements();) { Object key = e.nextElement(); _visibleParameters.put( key, _parameters.get( key ) ); } } } return _visibleParameters; }
if (token.equals( "&" )) { state = STATE_INITIAL; if (name != null && value != null) addParameter( name, value ); name = value = null; } else if (token.equals( "=" )) { name = HttpUnitUtils.decode( token, getMessageEncoding() ); value = ""; state = STATE_HAVE_NAME; } else { value = HttpUnitUtils.decode( token, getMessageEncoding() ); state = STATE_HAVE_VALUE; if (name != null && value != null) addParameter( name, value );
/** * Returns an array of <code>String</code> objects containing * all of the values the * given request parameter has, or <code>null</code> if the * parameter does not exist. For example, in an HTTP servlet, * this method returns an array of <code>String</code> objects * containing the values of a query string or posted form. **/ public String[] getParameterValues( String name ) { return _requestContext.getParameterValues( name ); }
private void addParameter( String name, String encodedValue ) { String[] values = (String[]) _parameters.get( name ); _visibleParameters = null; if (values == null) { _parameters.put( name, new String[] { encodedValue } ); } else { _parameters.put( name, extendedArray( values, encodedValue ) ); } }
_secure = _protocol.endsWith("s" ); _requestContext = new RequestContext( request.getURL() ); String contentTypeHeader = (String) _headers.get( "Content-Type" ); if (contentTypeHeader != null) { _contentType = res[0]; _charset = res[1]; _requestContext.setMessageEncoding( _charset ); _requestContext.setMessageBody( _messageBody );
String getParameter( String name ) { String[] parameters = (String[]) getParameters().get( name ); return parameters == null ? null : parameters[0]; }
private Hashtable getParameters() { if (_messageBody != null) { loadParameters( getMessageBodyAsString() ); _messageBody = null; } if (_visibleParameters == null) { if (_parentRequest == null) { _visibleParameters = _parameters; } else { _visibleParameters = new Hashtable(); final Map parameterMap = _parentRequest.getParameterMap(); for (Iterator i = parameterMap.keySet().iterator(); i.hasNext();) { Object key = i.next(); _visibleParameters.put( key, parameterMap.get( key ) ); } for (Enumeration e = _parameters.keys(); e.hasMoreElements();) { Object key = e.nextElement(); _visibleParameters.put( key, _parameters.get( key ) ); } } } return _visibleParameters; }
if (token.equals( "&" )) { state = STATE_INITIAL; if (name != null && value != null) addParameter( name, value ); name = value = null; } else if (token.equals( "=" )) { name = HttpUnitUtils.decode( token, getMessageEncoding() ); value = ""; state = STATE_HAVE_NAME; } else { value = HttpUnitUtils.decode( token, getMessageEncoding() ); state = STATE_HAVE_VALUE; if (name != null && value != null) addParameter( name, value );
/** * Returns an array of <code>String</code> objects containing * all of the values the * given request parameter has, or <code>null</code> if the * parameter does not exist. For example, in an HTTP servlet, * this method returns an array of <code>String</code> objects * containing the values of a query string or posted form. **/ public String[] getParameterValues( String name ) { return _requestContext.getParameterValues( name ); }
private void addParameter( String name, String encodedValue ) { String[] values = (String[]) _parameters.get( name ); _visibleParameters = null; if (values == null) { _parameters.put( name, new String[] { encodedValue } ); } else { _parameters.put( name, extendedArray( values, encodedValue ) ); } }
_secure = _protocol.endsWith("s" ); _requestContext = new RequestContext( request.getURL() ); String contentTypeHeader = (String) _headers.get( "Content-Type" ); if (contentTypeHeader != null) { _contentType = res[0]; _charset = res[1]; _requestContext.setMessageEncoding( _charset ); _requestContext.setMessageBody( _messageBody );
String getParameter( String name ) { String[] parameters = (String[]) getParameters().get( name ); return parameters == null ? null : parameters[0]; }
private Hashtable getParameters() { if (_messageBody != null) { loadParameters( getMessageBodyAsString() ); _messageBody = null; } if (_visibleParameters == null) { if (_parentRequest == null) { _visibleParameters = _parameters; } else { _visibleParameters = new Hashtable(); final Map parameterMap = _parentRequest.getParameterMap(); for (Iterator i = parameterMap.keySet().iterator(); i.hasNext();) { Object key = i.next(); _visibleParameters.put( key, parameterMap.get( key ) ); } for (Enumeration e = _parameters.keys(); e.hasMoreElements();) { Object key = e.nextElement(); _visibleParameters.put( key, _parameters.get( key ) ); } } } return _visibleParameters; }
if (token.equals( "&" )) { state = STATE_INITIAL; if (name != null && value != null) addParameter( name, value ); name = value = null; } else if (token.equals( "=" )) { name = HttpUnitUtils.decode( token, getMessageEncoding() ); value = ""; state = STATE_HAVE_NAME; } else { value = HttpUnitUtils.decode( token, getMessageEncoding() ); state = STATE_HAVE_VALUE; if (name != null && value != null) addParameter( name, value );
/** * Returns a java.util.Map of the parameters of this request. * Request parameters are extra information sent with the request. For HTTP servlets, parameters are contained * in the query string or posted form data. * * @since 1.3 **/ public Map getParameterMap() { return _requestContext.getParameterMap(); }