简体   繁体   English

从外部服务器接收带有servlet的http帖子

[英]Receive an http post from an external server with servlet

on my public web application running on JBoss 5 with Java 6 I need to implement something that receive an http post from another external server with some parameters (server to server call) . 在使用Java 6在JBoss 5上运行的公共Web应用程序上,我需要实现一些从其他外部服务器接收带有某些参数(服务器到服务器调用)的http帖子的东西。
The server that call me doesn't need an answer, just standard http code reponse( es 200 - OK). 打电话给我的服务器不需要回答,只需标准的http代码响应(es 200-OK)。
Can I use a servlet for this? 我可以为此使用servlet吗?
If not what should I use? 如果没有,我应该怎么用? (I cant'use restfull or soap ws). (我不能用Restfull或肥皂水)。

To my knowledge, your best bet for given situation is REST or SOAP. 据我所知,在给定情况下最好的选择是REST或SOAP。 But you already mentioned that you cannot use that. 但是您已经提到不能使用它。 I don't see any reason why a servlet can't be used here. 我看不出无法在此处使用servlet的任何原因。 You have request & response objects in servlet doPost method. 您在servlet doPost方法中具有请求和响应对象。 You can manipulate the response object to set appropriate response code back. 您可以操纵响应对象以设置适当的响应代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM