on 12-02-2005 4:43 PM
Is it possible to sent a request from a webdynpro to a servlet via the POST method?
Can someone give me a example?
Hello Peter,
You can use HTTPClient from Jakarta
http://jakarta.apache.org/commons/httpclient
Example of using POST method http://jakarta.apache.org/commons/httpclient/methods/post.html
Example:
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.methods.PostMethod;
String strURL = "http://localhost/Servlet";
PostMethod post = new PostMethod(strURL);
HttpClient httpclient = new HttpClient();
int result = httpclient.executeMethod(post);
String responseAsString = post.getResponseBodyAsString();
Best regards, Maksim Rashchynski.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Peter,
Check destinations service:
http://help.sap.com/saphelp_webas630/helpdata/en/17/d609b48ea5f748b47c0f32be265935/content.htm
http://help.sap.com/saphelp_webas630/helpdata/en/07/0d27932264284b883dab13ce1008a6/frameset.htm
http://help.sap.com/saphelp_webas630/helpdata/en/8b/8e7dac1e661d44bf2a676fd3948cc6/frameset.htm
It should looks like
final HttpURLConnection connection = _HTTPDestination.getURLConnection("POST");
Best regards, Maksim Rashchynski.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.