Package br.net.woodstock.rockframework.web

Examples of br.net.woodstock.rockframework.web.WebException


  protected boolean validateReferer(final HttpServletRequest request) {
    if (this.regex == null) {
      this.regex = this.getInitParameter(RegexRefererFilter.REGEX_PARAMETER);
    }
    if (Conditions.isEmpty(this.regex)) {
      throw new WebException("Parameter '" + RegexRefererFilter.REGEX_PARAMETER + "' must be set");
    }
    if (super.validateReferer(request)) {
      String referer = HttpServletRequests.getReferer(request);
      if (Pattern.matches(this.regex, referer)) {
        return true;
View Full Code Here


    try {
      XmlDocument document = XmlDocument.read(new ByteArrayInputStream(bytes));
      String xml = document.toString();
      return xml;
    } catch (SAXException e) {
      throw new WebException(e);
    }
  }
View Full Code Here

      String clazzName = this.getInitParameter(ParameterizedResourceFilter.RESOURCE_MANAGER_PARAMETER);
      Class clazz = Class.forName(clazzName);
      ResourceManager resourceManager = (ResourceManager) clazz.newInstance();
      this.setResourceManager(resourceManager);
    } catch (Exception e) {
      throw new WebException(e);
    }
  }
View Full Code Here

TOP

Related Classes of br.net.woodstock.rockframework.web.WebException

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.