Package net.sourceforge.stripes.action

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


     * @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

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

    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

Related Classes of net.sourceforge.stripes.action.ErrorResolution

Copyright © 2018 www.massapicom. 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.