Hi all,
Thanks to Paul, I finally figure out why my input stream was consumed before
reaching JAX-RS.
Actually, I'm using AppFuse for my project and it adds a lot of filter in
the web.xml.
I tried to deploy my app without any filters and it worked!!!!!
Here's the list of filter based on AppFuse:
- com.opensymphony.oscache.web.filter.CacheFilter
- com.opensymphony.clickstream.ClickstreamFilter
- org.springframework.web.filter.CharacterEncodingFilter
- org.displaytag.filter.ResponseOverrideFilter
- net.sf.ehcache.constructs.web.filter.GzipFilter
- org.appfuse.webapp.filter.LocaleFilter
- org.tuckey.web.filters.urlrewrite.UrlRewriteFilter
- org.acegisecurity.util.FilterToBeanProxy
- com.opensymphony.module.sitemesh.filter.PageFilter
- org.appfuse.webapp.filter.StaticFilter
- org.apache.struts2.dispatcher.ActionContextCleanUp
- org.apache.struts2.dispatcher.FilterDispatcher
One of these filter is not working with JAX-RS and especially with
x-www-form-urlencoded content...
Hope that helps
Denis
On Wed, Aug 20, 2008 at 2:25 PM, Denis <deniak.nospam_at_gmail.com> wrote:
> Hi Paul,
>
> I just checked my Tomcat configuration file (server.xml) and I don't have
> any valves registered
> but I was able to get my parameters using Servlet.getParameter*.
>
> As you said and according to the Servlet.getParameter result, the body of
> the request must be consumed
> before.
> Do you have any idea when and where it's consumed?
> It's really strange. Here's what I found in the ServletRequest javadoc:
>
> *If the parameter data was sent in the request body, such as occurs
> with an HTTP POST request, then reading the body directly via {_at_link
> #getInputStream} or {_at_link #getReader} can interfere
> with the execution of this method.*
>
> By the way, thanks for your help.
>