Package er.extensions.appserver

Examples of er.extensions.appserver.ERXResponse.appendContentString()


                for (MApplication app : siteConfig().applicationArray()) {
                    handler.getInstanceStatusForHosts(app.hostArray());
                    NSDictionary appStats = historyEntry(app);
                    stats.addObject(appStats);
                }
                response.appendContentString(NSPropertyListSerialization.stringFromPropertyList(stats));
            } finally {
                handler.endReading();
            }
        }
        return response;
View Full Code Here


                }
                result += "\"";
            }
            result += "}";
        }
        woresponse.appendContentString("[" + result + "]");
        return woresponse;
    }

    public WOActionResults runningAction() {
        ERXResponse woresponse = new ERXResponse("YES");
View Full Code Here

        WORequest aRequest = request();
        ERXResponse aResponse = new ERXResponse();

        if (aRequest.isUsingWebServer())  {
            aResponse.setStatus(WOMessage.HTTP_STATUS_FORBIDDEN);
            aResponse.appendContentString("Access Denied");
            return aResponse;
        }
        String aPath = aRequest.headerForKey("filepath");
        boolean showFiles = (aRequest.headerForKey("showFiles") != null) ? true : false;
View Full Code Here

        String aPath = aRequest.headerForKey("filepath");
        boolean showFiles = (aRequest.headerForKey("showFiles") != null) ? true : false;

        // looking for roots, or root listing of only 1 root
        if (aPath == null && !singleRoot) {
            aResponse.appendContentString(xmlRoots);
            aResponse.setHeader("YES", "isRoots");
        } else {
            if (aPath == null) aPath = rootStrings[0];
            NSArray anArray = fileListForStartingPath(aPath, showFiles);
View Full Code Here

        } else {
            if (aPath == null) aPath = rootStrings[0];
            NSArray anArray = fileListForStartingPath(aPath, showFiles);

            if (anArray == null) {
                aResponse.appendContentString("ERROR");
            } else {
                _JavaMonitorCoder aCoder = new _JavaMonitorCoder();
                String anXMLString = null;
                anXMLString = aCoder.encodeRootObjectForKey(anArray, "pathArray");
                anXMLString = (anXMLString) + " \r\n";
View Full Code Here

            } else {
                _JavaMonitorCoder aCoder = new _JavaMonitorCoder();
                String anXMLString = null;
                anXMLString = aCoder.encodeRootObjectForKey(anArray, "pathArray");
                anXMLString = (anXMLString) + " \r\n";
                aResponse.appendContentString(anXMLString);
                aResponse.setHeader(aPath, "filepath");
            }
        }
        return aResponse;
    }
View Full Code Here

    }

   
    protected WOResponse dictionaryResponse(NSDictionary<?,?> dict) {
        ERXResponse response = new ERXResponse();
        response.appendContentString("<html><body>");
        for (Enumeration<?> e = dict.keyEnumerator(); e.hasMoreElements();) {
            Object key = e.nextElement();
            Object value = dict.objectForKey(key);
            response.appendContentString("<span id='" + key + "'>" + value + "</span>\n");
        }
View Full Code Here

        ERXResponse response = new ERXResponse();
        response.appendContentString("<html><body>");
        for (Enumeration<?> e = dict.keyEnumerator(); e.hasMoreElements();) {
            Object key = e.nextElement();
            Object value = dict.objectForKey(key);
            response.appendContentString("<span id='" + key + "'>" + value + "</span>\n");
        }
        response.appendContentString("</body></html>");
        return response;
    }
   
View Full Code Here

        for (Enumeration<?> e = dict.keyEnumerator(); e.hasMoreElements();) {
            Object key = e.nextElement();
            Object value = dict.objectForKey(key);
            response.appendContentString("<span id='" + key + "'>" + value + "</span>\n");
        }
        response.appendContentString("</body></html>");
        return response;
    }
   
    protected WOResponse stringResponse(String s) {
        return new ERXResponse(s);   
View Full Code Here

        else if (_action != null) {
          return (WOActionResults) _action.valueInComponent(component);
        } else {
          ERXResponse response = new ERXResponse();
          //AK: we might want to be able to set this...
          response.appendContentString("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">");
          response.appendContentString("<html><body style='border:0; margin: 0; padding: 0; width:100%; height: 100%'>");
          doAppendChildrenToResponse(response, context);
          response.appendContentString("</body></html>");
          ERXResponseComponent comp = (ERXResponseComponent) WOApplication.application().pageWithName("ERXResponseComponent", context);
          comp.setResponse(response);
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.