Hi, I resolved my problem. The problem was that the method request.getInputStream().read() just finish reading the in the server.xml file defined maxHTTPHeaderSize of the inputStream. So I wrote my own method to read the inputsteam and everything works fine.
Besides I changed my client-side to multipartFileUpload (like the example from the previous posted link: http://svn.apache.org/viewvc/httpcomponents/oac.hc3x/trunk/src/examples/MultipartFileUploadApp.java?view=markup) Thank you for your help! Jana -----Ursprüngliche Nachricht----- Von: André Warnier [mailto:a...@ice-sa.com] Gesendet: Dienstag, 19. April 2011 16:10 An: Tomcat Users List Betreff: Re: AW: Setting the maxHTTPHeaderSize to 'infinity' Pid wrote: > On 4/19/11 12:20 PM, André Warnier wrote: >> Hi. >> >> I will let someone else comment on your code. > > I can say that doesn't look like i'd expect it to, per the example code > from the Commons HTTP 3.x or HTTP Client 4.x versions. > > > >> (But remember, this is a help forum for Tomcat, which is the server >> side. It is not really a forum to help people write Java HTTP cients). >> >> It looks like this is your first try at sending a file to a server. >> So let me recommend something : >> >> I would start by creating a simple HTML form with an <input type="file" >> ..>, and then make sure that it works using the form. >> (Because, to upload a file, you also need to have some special code on >> the server to receive it, and you had better make sure that that side is >> working first). > > +1 > >> You can find an example here : >> http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/tomcat/util/http/fileupload/package-summary.html >> >> and maybe someone else can suggest more examples somewhere. > > http://svn.apache.org/viewvc/httpcomponents/oac.hc3x/trunk/src/examples/MultipartFileUploadApp.java?view=markup > > Lest Jana would get confused : The first link above points to an example for the server code needed (the servlet which receives the file upload POST). The second example is one for the client side : the workstation Java program which uploads a file to a server, via a POST request. > p > >> Then, once it is working with the form, attack the client side. >> If you search a bit on Google, you will find several examples of how to >> do this right. >> No need to re-invent the wheel. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org