Examples of ErrorResolution


Examples of com.github.dynamicextensionsalfresco.webscripts.resolutions.ErrorResolution

      if (bundle.getBundleId() == 0) {
        model.put(Variables.SYSTEM_PACKAGE_COUNT, getSystemPackages().size());
      }
      model.put(Variables.BUNDLE, new TemplateBundle(bundle));
    } else {
      return new ErrorResolution(HttpServletResponse.SC_NOT_FOUND);
    }
    return new TemplateResolution(model);
  }
View Full Code Here

Examples of net.sourceforge.stripes.action.ErrorResolution

        if (isPermittedWithoutLogin(ctx.getActionBean())) {
            return ctx.proceed();
        }
        else if (!actionBeanContext.isLoggedIn()) {
            if (AjaxUtils.isAjaxRequest(actionBeanContext.getRequest())) {
                return new ErrorResolution(HttpServletResponse.SC_FORBIDDEN, null);
            }
            addRequestedUrlToContext(actionBeanContext);
            return new ForwardResolution(LoginActionBean.class);
        }
        else {
View Full Code Here

Examples of net.sourceforge.stripes.action.ErrorResolution

     * @return an error resolution if needed, <code>null</code> otherwise
     */
    @Before(stages = LifecycleStage.BindingAndValidation)
    public Resolution checkRunningInDevelopmentEnvironment() {
        if (SystemProperty.environment.value() != SystemProperty.Environment.Value.Development) {
            return new ErrorResolution(HttpServletResponse.SC_FORBIDDEN,
                                       "this action should not be called in production");
        }
        return null;
    }
View Full Code Here

Examples of net.sourceforge.stripes.action.ErrorResolution

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

public class CustomExceptionHandler extends DefaultExceptionHandler{
    public Resolution catchActionBeanNotFoundException(ActionBeanNotFoundException ex, HttpServletRequest req, HttpServletResponse res) {
        return new ErrorResolution(404);
    }
View Full Code Here

Examples of net.sourceforge.stripes.action.ErrorResolution

    public Resolution catchActionBeanNotFoundException(ActionBeanNotFoundException ex, HttpServletRequest req, HttpServletResponse res) {
        return new ErrorResolution(404);
    }

    public Resolution catchAll(Exception ex, HttpServletRequest req, HttpServletResponse res) {
        return new ErrorResolution(500);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.