質問

The device sends an HTTP PUT request to the tomcat server.And server response '200(OK) status code to indicate success. But I don't know how to receive and response using tomcat .Thanks for any help very much.

役に立ちましたか?

解決

You need to read the response body via ServletRequest.getInputStream() or ServletRequest.getReader(). There is no need to set the response code, it will be 200 by default unless an error occurs. You might want to send a response body. See Tomcat's DefaultServlet for how it implements PUT (note that it is disabled by default for security reasons).

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top