如何使用tomcat接收和響應HTTP PUT? (How to use tomcat to receive and response the HTTP PUT?)


問題描述

如何使用tomcat接收和響應HTTP PUT? (How to use tomcat to receive and response the HTTP PUT?)

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.

‑‑‑‑‑

參考解法

方法 1:

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).

(by zorroMark Thomas)

參考文件

  1. How to use tomcat to receive and response the HTTP PUT? (CC BY‑SA 3.0/4.0)

#mdm #tomcat #http-put






相關問題

如何部署 MDM 簽到服務器? (How to deploy a MDM check-in sever?)

如何使用tomcat接收和響應HTTP PUT? (How to use tomcat to receive and response the HTTP PUT?)

更新託管應用程序和 App Lock Payload (Updating managed application and App Lock Payload)

Chính sách MDM của iOS (iOS MDM policies)

ipa 文件包含非法字符? (ipa file contains illegal characters?)

MacOSX 服務器 - 註冊 (MacOSX Server - Enrollment)

使用 MDM 解決方案發布 iOS 應用 (Publish iOS app using MDM solution)

遠程安裝應用程序(使用 MDM) (Installing an app remotely (using MDM))

如何配置 Apache 以接受具有 TLS v1.2 的過期客戶端證書? (How configure Apache to accept expired client certificate with TLS v1.2?)

如何使用 MDM 訪問 Apple Push Notification 的內容? (How to access content of Apple Push Notification by using MDM?)

如何使用設備的自定義屬性來獲取產品的版本號 (How can I use Custom Attributes for devices in order to get Version number of Products)

Xamarin IOS 需要重定向到 BB Access 以進行 OpenID 連接 (Xamarin IOS needs to redirect to BB Access for OpenID connection)







留言討論