我是在
(the commented part is something I tried as well, but with no results). The server code looks like this: Where both the String title and the InputStream are null/empty. I ve debugged and checked the request object, but couldn t find anything looking like my parameter. Also, I found something sounding similar to my problem here, but the answer didn t help me much as I don t work with Apache Camel and therefore can t use the Exchange class. Oh, and the similar GET request is working excellent, but here I just got stuck. :/ 我感谢任何帮助! Kind regards,
jellyfishHttpPost httpPost = new HttpPost(params[0]);
HttpParams httpParams = new BasicHttpParams();
httpParams.setParameter("title", "message");
//... setting some other parameters like http timeout, which I checked and which work
httpPost.setParams(httpParams);
//HttpEntity myEntity = new StringEntity(messageBody);
//httpPost.setEntity(myEntity);
response = httpClient.execute(httpPost);
public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
{
response.setContentType("text/plain;charset=utf-8");
if (target.contentEquals("/postKdm"))
{
String title = request.getParameter("title");
InputStream instream = request.getInputStream();
BufferedReader reader = new BufferedReader(new InputStreamReader(instream));
StringBuilder sb = new StringBuilder();
String line = null;
while ((line = reader.readLine()) != null)
{
sb.append(line);
}
System.out.println(title);
response.setStatus(HttpServletResponse.SC_OK);
}
}
Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...