Well, I've been looking through those 15 lines last two days.. I tried Apache's HttpClient with same effect (I used FileEntity for body, not multipart). I've seen many examples in Google which send post request.. My code is just the same.. And I found a nasty thing - when I run my request against GWT's embedded Tomcat (and I think it's 5.x) everything works just fine!! So it's likely problem either in my Tomcat 6's settings or in Tomcat 6 itself
Will continue my research and post here, but I'd greatly appreciate if someone tried to POST to Tomcat 6 with java client (or perhaps you have such JUnit test?) Andrey 2009/4/7 David Smith <d...@cornell.edu> > This smells like tomcat is behaving absolutely correct, but your client > code isn't. Can you verify your client code is properly making the > request and handling the response? It could be you aren't using > HttpURLConnection correctly to upload a file. As much as you are trying > to avoid it, you are probably going to have to invest some quality time > in the libraries, etc. that properly support multipart file upload > requests. > > --David > > Andrey Razumovsky wrote: > > Sure. > > That's where my investigations lead me to: > > I'm sending POST request from Java (see code in my first message) to > Tomcat > > 6. But, somehow, the request comes there is GET (!) Also Content-Length, > > Content-Type and other header parameters are reset to default values (see > > valve trace in my second message). And mainly, servlet's input stream is > > empty. > > When I do POST from simple HTML,everything's fine. > > > > Hope you'll help me to figure out who's replacing request's header and > > content > > > > Andrey > > > > 2009/4/7 Caldarale, Charles R <chuck.caldar...@unisys.com> > > > > > >>> From: Andrey Razumovsky [mailto:razumovsky.and...@gmail.com] > >>> Subject: Re: Cannot read httpservlet's inputstream > >>> > >>> I figured out that the problem is in client side... > >>> When I fire POST request from HTML, it is received well... > >>> I've doublechecked my connection code - it seems all right. > >>> Can anyone help me here? > >>> > >> After your various contradictory messages, I have no idea what your > problem > >> is at the moment. Would you mind restating it? > >> > >> - Chuck > >> > >> > >> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY > >> MATERIAL and is thus for use only by the intended recipient. If you > received > >> this in error, please contact the sender and delete the e-mail and its > >> attachments from all computers. > >> > >> > >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >