从 servlet 接收空响应

发布于 2024-12-09 19:07:55 字数 573 浏览 0 评论 0原文

我有一个 ajax Web 应用程序,请求数据到部署在 Tomcat 5.5 上的 servlet。我正在使用 HTTPS 协议连接到 Tomcat。

我编写了一个从 ajax 页面调用的 servlet,它以 XML 形式响应 。但有时,我收到的回复是空的,里面什么也没有,只是空白(我承认我没有以任何方式发送任何空白回复)。

我调查了 Tomcat 访问日志,它显示了以下条目:

<Time> \MyServlet HTTP/1.1" 200 -

这意味着我的请求正常,已满足,并且响应字节为零,如 -

我在 Tomcat 日志中也没有发现任何错误/异常。

我不知道这个空响应来自哪里,因为我的服务器端日志不包含此请求的任何详细信息。

当我尝试通过添加一些日志语句来调试 servlet 时,这些语句甚至没有被打印。我假设服务方法甚至没有执行。

这是由于 Tomcat 造成的吗?

Tomcat 5.5 可以处理的线程/请求的具体数量吗?

I have an ajax web application requesting data to servlet deployed on Tomcat 5.5. I am connecting to Tomcat using HTTPS protocol.

I wrote one servlet which is called from ajax page and it responds in the form of XML as <response></response>. But sometimes, I receive response as empty, nothing in it, just blank (and I confess that I am not sending any blank response in any way).

I investigated Tomcat access logs and it shows me following entry:

<Time> \MyServlet HTTP/1.1" 200 -

Which means that my request was OK, fulfilled and response bytes are zero as -.

I did not find any error/exception in Tomcat logs as well.

I have no idea from where this empty response comes as my server side logs does not contain any detail for this request.

When I tried to debug the servlet by adding some logging statements, those statements are not even getting printed. I am assuming that service method is not even executed.

Is this due to Tomcat?

is there specific number of threads/request that Tomcat 5.5 can handle?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文