You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Sergey Beryozkin (JIRA)" <ji...@apache.org> on 2013/12/06 12:25:36 UTC
[jira] [Comment Edited] (CXF-2993) @Context HttpServletRequest does
not contain POST data. It's however is in MultivaluedMap .
[ https://issues.apache.org/jira/browse/CXF-2993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13841197#comment-13841197 ]
Sergey Beryozkin edited comment on CXF-2993 at 12/6/13 11:25 AM:
-----------------------------------------------------------------
I honestly do not think it is a bug. For whatever reasons the underlying container inserts the form payload into the request parameters, CXF does not interfere anywhere into this process at all. Please provide a test project reproducing the issue say on Tomcat 6 or 7 if you are not convinced, thanks
was (Author: sergey_beryozkin):
I honestly do not think it is a bug. For whatever reasons the underlying container inserts the form payload into the request parameters, CXF does not interfere anywhere into this process at all. Please provide a test project reproducing the issue say on Tomcat 6 or 6 if you are not convinced, thanks
> @Context HttpServletRequest does not contain POST data. It's however is in MultivaluedMap<String, String> .
> ------------------------------------------------------------------------------------------------------------
>
> Key: CXF-2993
> URL: https://issues.apache.org/jira/browse/CXF-2993
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS
> Affects Versions: 2.2.9, 2.2.10
> Environment: Dev
> Reporter: John Tran
>
> I try to use @Context HttpServletRequest from my JAX-RS method to retrieve POST data but it's not there. It's however is in MultivaluedMap<String, String> parameterMap
> Here is the code.
> @Resource
> @Path("/rating")
> public class RatingRs {
> @Path("/create")
> @POST
> @Consumes("application/x-www-form-urlencoded")
> @Produces("application/json")
> public void createRating( @Context HttpServletRequest requestObject, @Context HttpServletResponse response, MultivaluedMap<String, String> parameterMap){
>
> Map map = requestObject.getParameterMap(); //THIS RETURNS EMPTY, WHY? SHOULD CONTAIN "itemId"="blah"
> String itemId = requestObject.getParameter("itemId"); //returns null SHOULD NOT BE NULL
> List values = parameterMap.get("itemId"); //RETURNS THE CORRECT VALUE HERE.
> }
> }
--
This message was sent by Atlassian JIRA
(v6.1#6144)