1112131415161718
public void intercept(ActionInvocation ai) { Controller controller = ai.getController(); if ("GET".equalsIgnoreCase(controller.getRequest().getMethod())) ai.invoke(); else controller.renderError404(); } }
public void intercept(ActionInvocation ai) { Controller controller = ai.getController(); if ("POST".equalsIgnoreCase(controller.getRequest().getMethod().toUpperCase())) ai.invoke(); else controller.renderError404(); } }
2728293031323334
public void intercept(ActionInvocation invocation) { Controller controller = invocation.getController(); if (controller.getPara() == null) invocation.invoke(); else controller.renderError404(); } }