Package com.webobjects.appserver

Examples of com.webobjects.appserver.WORequest.headerForKey()


        }

        // Checking to see if the password was corrent
        theApplication._lock.startReading();
        try {
            String passwordHeader = aRequest.headerForKey("password");
            if (!aConfig.comparePasswordWithPassword(passwordHeader)) {
                NSLog.debug.appendln("Attempt to call DirectAction: monitorRequestAction with incorrect password.");
                aResponse.setStatus(WOMessage.HTTP_STATUS_FORBIDDEN);
                aResponse.appendContentString(_invalidPassword);
                // we endReading at the finally block
View Full Code Here


        theApplication._lock.startReading();
        try {

            // Check for correct password
            String passwordHeader = aRequest.headerForKey("password");
            if (!aConfig.comparePasswordWithPassword(passwordHeader)) {
                NSLog.debug.appendln("Attempt to call Direct Action: defaultAction with incorrect password.");
                aResponse.setStatus(WOMessage.HTTP_STATUS_FORBIDDEN);
                aResponse.appendContentString("Attempt to call Direct Action: defaultAction on wotaskd with incorrect password.");
                // we endReading at the finally block
View Full Code Here

        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;

        // looking for roots, or root listing of only 1 root
        if (aPath == null && !singleRoot) {
            aResponse.appendContentString(xmlRoots);
View Full Code Here

            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;

        // looking for roots, or root listing of only 1 root
        if (aPath == null && !singleRoot) {
            aResponse.appendContentString(xmlRoots);
            aResponse.setHeader("YES", "isRoots");
View Full Code Here

      String pageCacheKey = null;
      if (response != null) {
        pageCacheKey = response.headerForKey(ERXAjaxSession.PAGE_REPLACEMENT_CACHE_LOOKUP_KEY);
      }
      if (pageCacheKey == null && request != null) {
        pageCacheKey = request.headerForKey(ERXAjaxSession.PAGE_REPLACEMENT_CACHE_LOOKUP_KEY);
      }

      // A null pageCacheKey should mean an Ajax request that is not returning a content update or an expliclty not cached non-Ajax request
      if (pageCacheKey != null) {
        if (logger.isDebugEnabled()) logger.debug("Will use pageCacheKey " + pageCacheKey);
View Full Code Here

    {
      if ((aPageName == null) && (!aSession.storesIDsInCookies()))
      {
        WORequest request = aContext.request();

        String cookieHeader = request.headerForKey("cookie");

        if ((cookieHeader != null) && (cookieHeader.length() > 0)) {
          NSDictionary cookieDict = request.cookieValues();

          if ((cookieDict.objectForKey(WOApplication.application().sessionIdKey()) != null) || (cookieDict.objectForKey(WOApplication.application().instanceIdKey()) != null)) {
View Full Code Here

    ERXSession.setSession(this);
    ERXLocalizer.setCurrentLocalizer(localizer());
    NSNotificationCenter.defaultCenter().postNotification(SessionWillAwakeNotification, this);

    WORequest request = context() != null ? context().request() : null;
    if (request != null && log.isDebugEnabled() && request.headerForKey("content-type") != null) {
      if ((request.headerForKey("content-type")).toLowerCase().indexOf("multipart/form-data") == -1)
        log.debug("Form values " + request.formValues());
      else
        log.debug("Multipart Form values found");
    }
View Full Code Here

    ERXLocalizer.setCurrentLocalizer(localizer());
    NSNotificationCenter.defaultCenter().postNotification(SessionWillAwakeNotification, this);

    WORequest request = context() != null ? context().request() : null;
    if (request != null && log.isDebugEnabled() && request.headerForKey("content-type") != null) {
      if ((request.headerForKey("content-type")).toLowerCase().indexOf("multipart/form-data") == -1)
        log.debug("Form values " + request.formValues());
      else
        log.debug("Multipart Form values found");
    }
    _originalThreadName = Thread.currentThread().getName();
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.