Examples of VelocityErrorPage


Examples of org.tamacat.httpd.page.VelocityErrorPage

  }
 
  protected VelocityErrorPage getErrorPage() {
      if (errorPage == null) {
        Properties props = PropertyUtils.getProperties("velocity.properties", getClassLoader());
        errorPage = new VelocityErrorPage(props);
      }
    return errorPage;
  }
View Full Code Here

Examples of org.tamacat.httpd.page.VelocityErrorPage

      this.serviceUrl = serviceUrl;
      for (HttpFilter filter : filters) {
        filter.init(serviceUrl);
      }
    Properties props = PropertyUtils.getProperties("velocity.properties", getClassLoader());
      errorPage = new VelocityErrorPage(props);
    }
View Full Code Here

Examples of org.tamacat.httpd.page.VelocityErrorPage

  public void tearDown() throws Exception {
  }

  @Test
  public void testGetPrintErrorPage() {
    VelocityErrorPage template = new VelocityErrorPage(props);
    HttpRequest request = new BasicHttpRequest("GET", "http://localhost/test");
    HttpResponse response = new BasicHttpResponse(
        new BasicStatusLine(new ProtocolVersion("HTTP",1,1), 404, "Not Found"));
    HttpException exception = new NotFoundException();
    String page = template.getErrorPage(request, response, exception);
    assertNotNull(page);
  }
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.