It's not supposed to make a difference, but ...
// N.B. Due to an AspectJ implementation quirk where it does bytecode
// weaving instead of real VM advising, joinpoint shadows inside jar files
// will not be matched by pointcuts here. That means we cannot use
// execution(void HttpServlet+.service(HttpServletRequest, HttpServletResponse)). :(
//
// If using other HTTP methods, you must add them here.
//
pointcut NDCFrame(HttpServletRequest request, HttpServletResponse response):
args(request, response) && (
execution(void HttpServlet+.doGet(HttpServletRequest, HttpServletResponse)) ||
execution(void HttpServlet+.doPost(HttpServletRequest, HttpServletResponse))
);
The solution is to use load-time weaving. Unfortunately, this requires modifying the container environment (rather than just the development environment) which increases the barrier to entry.