简体   繁体   English

什么是Java Tomcat中的Application_EndRequest(ASP.NET)等价物?

[英]What would be the equivalent of Application_EndRequest (ASP.NET) in Java Tomcat?

I saw this code snippet about post logging: https://serverfault.com/questions/90943/iis-log-request-body-post-data 我看到了关于发布日志的代码片段: https//serverfault.com/questions/90943/iis-log-request-body-post-data

which uses Application_EndRequest. 它使用Application_EndRequest。 Need to do the same in Java /Tomcat. 需要在Java / Tomcat中执行相同的操作。 Still will it work ? 它还能奏效吗? Because in IIS7 the request is passed along to app request handlers but in Tomcat I fear that the request parameters disappears if it is already pre-processed. 因为在IIS7中,请求被传递给应用程序请求处理程序,但在Tomcat中,我担心如果请求参数已经过预处理,请求参数就会消失。

You could probably use a Filter to do the logging you're looking for; 您可以使用过滤器来执行您正在寻找的日志记录; it also looks like Tomcat has a configuration option to log requests, although I don't know if it goes into details such as post parameters. 它看起来像Tomcat有一个配置选项来记录请求,虽然我不知道它是否进入详细信息,如post参数。

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

相关问题 WCF服务方法是否具有与ASP.NET Application_EndRequest等效的功能? - Does WCF service method have something equivalent to ASP.NET Application_EndRequest? 在什么情况下调用Application_EndRequest但是没有调用Application_BeginRequest? - In what situation Application_EndRequest is called but Application_BeginRequest is not called? 什么时候不能调用Application_EndRequest? - When might Application_EndRequest not be called? 在application_endrequest上部署对象上下文 - disposing object context on application_endrequest 什么是ASP.net项目中的Servlet(在tomcat中扩展HttpServlet的Java类)的等价物? - What is the equivalent of a Servlet (Java class that extends HttpServlet in tomcat) in an ASP.net project? mvc3调用不带Application_BeginRequest()的Application_EndRequest - mvc3 invokes Application_EndRequest without Application_BeginRequest() 如何在Application_EndRequest中获取RouteData - How do I get RouteData in Application_EndRequest 从代码返回值到asp.net ajax endrequest - Returning values from code to asp.net ajax endrequest ASP.NET 4.6 中 PersistKeysToDbContext 的等价物是什么? - What is the equivalent to PersistKeysToDbContext in ASP.NET 4.6? ASP.NET WebAPI中HttpServiceHost的等价物是什么? - What is the equivalent of HttpServiceHost in ASP.NET WebAPI?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM