[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] AspectJ with Servlets on Tomcat 5.x

 try to replace call with execution and see how it goes...

because, call will intercept any code that CALLS your servlet.
more likely it is tomcat which is calling ur serlvet, so you'd need to weave tomcat jars...
i have never done something like that before...

i think execution will solveyour problem


On 8/21/06, Jordi Cabré < cabrejcr@xxxxxxxx> wrote:
I've included my ControllerServlet and my LogAspect files.

Thanks for all.

package com.gmsoft.aspects;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public aspect LogAspect {
        pointcut doPostMethod ( com.gmsoft.ControllerServlet controller, HttpServletRequest request, HttpServletResponse response) : call (void com.gmsoft.ControllerServlet.doPost(HttpServletRequest request, HttpServletResponse response)) && target(controller) && args(request,response);
        pointcut sets (com.gmsoft.ControllerServlet controller, String name) : call (void com.gmsoft.ControllerServlet.set* (String)) && target(controller) && args(name);

        before (com.gmsoft.ControllerServlet controller, HttpServletRequest request, HttpServletResponse response) : doPostMethod(controller,request,response) {
                try {
                }catch (Exception ex) {

        before (com.gmsoft.ControllerServlet controller, String name) : sets(controller, name) {

aspectj-users mailing list