"/*" works! Thanks!
2009/4/9 Mark Thomas
> Andrey Razumovsky wrote:
> > Finally I did it! What was to be done is to change servlet mapping
> >
> > /
> > to
> > /DoveServlet
>
> Did you try:
> /*
> ?
>
> Mark
>
>
>
> -
> To unsub
Andrey Razumovsky wrote:
> Finally I did it! What was to be done is to change servlet mapping
>
> /
> to
> /DoveServlet
Did you try:
/*
?
Mark
-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional comma
Finally I did it! What was to be done is to change servlet mapping
/
to
/DoveServlet
so somewhy POST to servlet mapped to all urls does not work. Now I need URL
like /Dove/DoveServlet instead-of /Dove, but I'll survive this :)
2009/4/9 Andrey Razumovsky
> Same evil happens when I try to send M
Same evil happens when I try to send Multipart request:
HttpClient client = new DefaultHttpClient();
HttpPost post = new HttpPost(address);
MultipartEntity entity = new MultipartEntity();
entity.addPart("file", new FileBody(pack));
post.setEntity(entity);
Hi friends,
Problem still exists... Unforntunately I do not have a public URL. Could you
share you HTTP POST request code.
Lines with Content-Type, Content-Length etc are commented out because I
tried them but they didn't help. Event if I set them, server receives GET
with content-length=-1. Chang
André Warnier wrote:
Trying to redeem myself to Andrey for hijacking his post..
Andrey, in your (latest) client code you do not set either a
content-length, nor a "chunked" encoding headers.
Is it possible that Tomcat 6 just ignores your POST content in that case ?
In RFC2616, I find this in se
Caldarale, Charles R wrote:
From: André Warnier [mailto:a...@ice-sa.com]
Subject: Re: Cannot read httpservlet's inputstream
Does there exist a library somewhere which allows me to feed it this
InputStream and which will parse the parts for me appropriately (for
example allowing me to dete
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
André,
On 4/7/2009 5:56 PM, André Warnier wrote:
> Now suppose I /do/ a POST with multipart/form-data encoding to a Tomcat
> servlet, and one of the parts /is/ a large file.
> How can I handle this at the servlet level ?
Of course you can. Haven't we
> From: André Warnier [mailto:a...@ice-sa.com]
> Subject: Re: Cannot read httpservlet's inputstream
>
> Does there exist a library somewhere which allows me to feed it this
> InputStream and which will parse the parts for me appropriately (for
> example allowing me
Christopher Schultz wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
André,
On 4/7/2009 4:49 PM, André Warnier wrote:
Ok Mark, I don't pretend I know how it works in Tomcat.
How does one upload a file then ?
That depends on how you /want/ to upload it. If you want to use the
standard HTM
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
André,
On 4/7/2009 4:49 PM, André Warnier wrote:
> Ok Mark, I don't pretend I know how it works in Tomcat.
> How does one upload a file then ?
That depends on how you /want/ to upload it. If you want to use the
standard HTML form-based file upload, y
André Warnier wrote:
> Mark Thomas wrote:
>> André Warnier wrote:
>>> Despite what you may wish and what you may have found in Google, I
>>> believe that if you want to send a file, you have to do it with a
>>> "multipart/form-data" content type.
>>
>> Nope. That is just plain wrong.
>>
>>> http://
Mark Thomas wrote:
André Warnier wrote:
Despite what you may wish and what you may have found in Google, I
believe that if you want to send a file, you have to do it with a
"multipart/form-data" content type.
Nope. That is just plain wrong.
http://www.faqs.org/rfcs/rfc2616.html
Sections 9.5
André Warnier wrote:
> Despite what you may wish and what you may have found in Google, I
> believe that if you want to send a file, you have to do it with a
> "multipart/form-data" content type.
Nope. That is just plain wrong.
> http://www.faqs.org/rfcs/rfc2616.html
> Sections 9.5 (POST) and 9.6
Andrey Razumovsky wrote:
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..
Hi.
I did some research, becaus
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Andrey,
On 4/7/2009 10:12 AM, Andrey Razumovsky wrote:
> HttpURLConnection connect = (HttpURLConnection)
> url.openConnection();
> connect.setRequestMethod("POST");
> connect.setDoInput(true)
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Andrey,
On 4/6/2009 11:47 AM, Andrey Razumovsky wrote:
> //connect.setRequestProperty("Content-Type", "text/plain");
One more thing: you should /definitely/ set the charset in the Content-Type.
- -chris
-BEGIN PGP SIGNATURE-
Version:
request's header and
> > content
> >
> > Andrey
> >
> > 2009/4/7 Caldarale, Charles R
> >
> >
> >>> From: Andrey Razumovsky [mailto:razumovsky.and...@gmail.com]
> >>> Subject: Re: Cannot read httpservlet's inputstream
>
om 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
>
>
>>> From: Andrey Razumovsky [mailto:razumovsky.and...@gmail.com]
>&g
getResponseCode());
}
else {
System.out.println("file " + pack.getPath() + " transfered");
}
}
2009/4/7 Caldarale, Charles R
> > From: Andrey Razumovsky [mailto:razumovsky.and...@gmail.com]
> > Subject: Re: Cannot read httpserv
> From: Andrey Razumovsky [mailto:razumovsky.and...@gmail.com]
> Subject: Re: Cannot read httpservlet's inputstream
>
> 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-Le
ovsky [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 s
> 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 connecti
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?
Hi Chris,
I've found that my servlet is receiving request GET instead-of POST. Maybe
this is causing the problem.. I used to get 200, but now when I removed
doGet(...) I get 405. Maybe I need to tune Tomcat somehow so that it could
receive POST?
07.04.2009 12:36:37 RequestDumperValve invoke : REQ
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Andrey,
On 4/6/2009 11:47 AM, Andrey Razumovsky wrote:
> if (connect.getResponseCode() != HttpURLConnection.HTTP_OK) {
> logObj.warn("file " + pack.getPath() + " was not transfered -
> response code " +
> connec
Hi list,
I'm pretty sure I'm missing something obvious, but I just can't understand
what the root of problem is.
I try to send file from java to Tomcat6's http servlet. I need to send file
alone (and probably some parameters in request), so I don't wanna mess with
multipart libraries (commons-file
27 matches
Mail list logo