You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "todd wolff (JIRA)" <ji...@apache.org> on 2011/01/28 22:00:44 UTC

[jira] Updated: (WICKET-3406) Invoking getParameter() on HttpServletRequest throws IllegalStateException

     [ https://issues.apache.org/jira/browse/WICKET-3406?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

todd wolff updated WICKET-3406:
-------------------------------

    Description: 
ServletWebRequest reads the post parameters from entity body rather than using getParameterMap and/or getParamteterNames method as indicated by ServletAPI:

"If the parameter data was sent in the request body, such as occurs with an HTTP POST request, then reading the body directly via getInputStream() or getReader() can interfere with the execution of this method."

IMO, trying to distinguish the get (query) parameters from the post parameters in the new Wicket request API is problematic.  The servlet API does not differentiate in terms of the parameter's source and programmers are therefore not inclined to handle them differently.  Within Wicket 1.4..x, the PageParameters object passed to a page's constructor contained parameters from both sources, now it no longer does, which will require that the user handle posted parameters separately - which is confusing. 

  was:
ServletWebRequest reads the post parameters from entity body rather than using getParameterMap and/or getParamteterNames method as indicated by ServletAPI:

"If the parameter data was sent in the request body, such as occurs with an HTTP POST request, then reading the body directly via getInputStream() or getReader() can interfere with the execution of this method."

IMO, trying to distinguish the get (query) parameters from the post parameters in the new Wicket request API is problematic for several reasons.  1.  The servlet API does not differentiate in terms of the parameter's source and programmers are therefore not inclined to handle them differently.  2.  Within Wicket 1.4..x, the PageParameters object passed to a page's constructor used to contain parameters from both sources, now it no longer does, which is confusing.  3. The method Request.getRequestParameters()  attempts to combine the query parameters and post parameters using a Set.  If multiple parameters with the same name and different values exist, which the spec allows, they will be overwritten. 




> Invoking getParameter() on HttpServletRequest throws IllegalStateException
> --------------------------------------------------------------------------
>
>                 Key: WICKET-3406
>                 URL: https://issues.apache.org/jira/browse/WICKET-3406
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5-RC1
>            Reporter: todd wolff
>
> ServletWebRequest reads the post parameters from entity body rather than using getParameterMap and/or getParamteterNames method as indicated by ServletAPI:
> "If the parameter data was sent in the request body, such as occurs with an HTTP POST request, then reading the body directly via getInputStream() or getReader() can interfere with the execution of this method."
> IMO, trying to distinguish the get (query) parameters from the post parameters in the new Wicket request API is problematic.  The servlet API does not differentiate in terms of the parameter's source and programmers are therefore not inclined to handle them differently.  Within Wicket 1.4..x, the PageParameters object passed to a page's constructor contained parameters from both sources, now it no longer does, which will require that the user handle posted parameters separately - which is confusing. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.