简体   繁体   中英

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

which uses Application_EndRequest. Need to do the same in 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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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