Package org.tamacat.httpd.exception

Examples of org.tamacat.httpd.exception.ForbiddenException


          response.setStatusCode(HttpStatus.SC_OK);
          ResponseUtils.setEntity(response, getEntity(html));
        } else {
          ///// 403 FORBIDDEN /////
          LOG.trace("Cannot read file " + fs);
          throw new ForbiddenException();
        }
      }
      ///// FOR FILE /////
      else {
        LOG.trace("File " + fs + " found");
        response.setStatusCode(HttpStatus.SC_OK);
        ResponseUtils.setEntity(response, getFileEntity(fs, p));
      }
    } catch (IOException e) {
      throw new ForbiddenException(e);
    }
  }
View Full Code Here


//            ReverseUrl reverseUrl = serviceUrl.getReverseUrl();
//            accessUrl = reverseUrl.getServiceUrl().getPath();
//          } else {
//            accessUrl = serviceUrl.getPath();
//          }
          if (StringUtils.isEmpty(accessUrl)) throw new ForbiddenException();
         
          if (isSuccess(remoteUser, accessUrl) == false) {
            throw new ForbiddenException();
          }
        }
  }
View Full Code Here

      }
    }
    if (isAllow == false) {
      //allows only -> denied all.
      if (denies.size() == 0) {
        throw new ForbiddenException();
      }
      //match denies -> denied.
      for (Entry<String, Integer> entry : denies.entrySet()) {
        String address = entry.getKey();
        int octet = entry.getValue();
        if (address.equals(matcher[octet-1]) || "*".equals(address)) {
          throw new ForbiddenException();
        }
      }
    }
  }
View Full Code Here

            request, response, file);
        response.setStatusCode(HttpStatus.SC_OK);
        ResponseUtils.setEntity(response, getEntity(html));
      } else {
        LOG.trace("Cannot read file " + file.getPath());
        throw new ForbiddenException();
      }
    }
    ///// 200 OK /////
    else {
      LOG.trace("File " + file.getPath() + " found");
View Full Code Here

TOP

Related Classes of org.tamacat.httpd.exception.ForbiddenException

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.