call a servlet's post method from another application's servlet
问题 I want to call a servlet's POST method from another application, in which I am passing request and response. Can anyone tell me how is that possible? 回答1: If your servlet is invoked in an HTTP POST then you can do an HTTP 307 redirect to another servlet and it will call it's doPost. If you want to POST to a different page from a servlet (or any Java method) you can compose a POST with something like HttpClient like this: PostMethod post = new PostMethod("http://jakarata.apache.org/");