Package org.tamacat.httpd.page

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


      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

  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

Related Classes of org.tamacat.httpd.page.VelocityErrorPage

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.