Ejemplo n.º 1
0
  public final String intercept(ActionInvocation actionInvocation) throws Exception {
    actionInvocation.addPreResultListener(this);

    executePreResultListener = true;

    try {
      return actionInvocation.invoke();
    } catch (Exception e) {
      executePreResultListener = false;
      throw e;
    }
  }
  public String intercept(ActionInvocation actionInvocation) throws Exception {
    DisplayPropertyHandler handler = displayPropertyManager.getDisplayPropertyHandler();

    Action action = (Action) actionInvocation.getAction();
    Map contextMap = actionInvocation.getInvocationContext().getContextMap();

    try {
      Ognl.setValue(KEY_DISPLAY_PROPERTY_HANDLER, contextMap, action, handler);
    } catch (NoSuchPropertyException e) {
    }

    return actionInvocation.invoke();
  }
 /*
  * ���� Javadoc��
  *
  * @see
  * com.opensymphony.xwork.interceptor.Interceptor#intercept(com.opensymphony
  * .xwork.ActionInvocation)
  */
 public String intercept(ActionInvocation invocation) throws Exception {
   // ActionContext.get
   // HttpServletRequest request = (HttpServletRequest)
   // ActionContext.getContext().get(HTTP_REQUEST);
   // HttpServletResponse response = (HttpServletRequest)
   // ActionContext.getContext().get(HTTP_RESPONSE);
   // response.addCookie(new Cookie());
   // Enumeration enum = request.get;
   String result = null;
   if (checkLogin != null && checkLogin.checkLogin()) {
     result = invocation.invoke();
     ResultConfig resultConf = new ResultConfig();
     resultConf.setName("SUCCESS");
   } else {
     result = LOGIN_ERROR;
   }
   return result;
 }