从 servlet 接收空响应
我有一个 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技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论