Examples of WOResponse


Examples of com.webobjects.appserver.WOResponse

        return WOTaskdHandler.siteConfig();
    }

    @Override
    public WOActionResults performActionNamed(String s) {
        WOResponse woresponse = new ERXResponse();
        if (!siteConfig().isPasswordRequired() || siteConfig().compareStringWithPassword(context().request().stringFormValueForKey("pw"))) {
            try {
                WOActionResults woactionresults = performMonitorActionNamed(s);
                if (woactionresults != null && (woactionresults instanceof WOResponse)) {
                    woresponse = (WOResponse) woactionresults;
                } else {
                    woresponse.setContent("OK");
                }
            } catch (DirectActionException directactionexception) {
                woresponse.setStatus(directactionexception.status);
                woresponse.setContent(s + " action failed: " + directactionexception.getMessage());
            } catch (Exception throwable) {
                woresponse.setStatus(ERXHttpStatusCodes.INTERNAL_ERROR);
                woresponse.setContent(s + " action failed: " + throwable.getMessage() + ". See Monitor's log for a stack trace.");
                throwable.printStackTrace();
            }
        } else {
            woresponse.setStatus(ERXHttpStatusCodes.STATUS_FORBIDDEN);
            woresponse.setContent("Monitor is password protected - password missing or incorrect.");
        }
        return woresponse;
    }
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.