Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: com/acme/gui/presObjs/ErrorPO1/GenerateTopError.java


1   /*
2    * Enhydra Java Application Server Project
3    * 
4    * The contents of this file are subject to the Enhydra Public License
5    * Version 1.1 (the "License"); you may not use this file except in
6    * compliance with the License. You may obtain a copy of the License on
7    * the Enhydra web site ( http://www.enhydra.org/ ).
8    * 
9    * Software distributed under the License is distributed on an "AS IS"
10   * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See 
11   * the License for the specific terms governing rights and limitations
12   * under the License.
13   * 
14   * The Initial Developer of the Enhydra Application Server is Lutris
15   * Technologies, Inc. The Enhydra Application Server and portions created
16   * by Lutris Technologies, Inc. are Copyright Lutris Technologies, Inc.
17   * All Rights Reserved.
18   * 
19   * Contributor(s):
20   * 
21   * $Id: GenerateTopError.java,v 1.7.10.1 2000/10/19 17:59:06 jasona Exp $
22   */
23  
24  
25  
26  
27  /*
28   * Test presentation object generating an error in the same directory
29   * st the error handler
30   */
31  
32  package com.acme.gui.presObjs.ErrorPO1;
33  
34  import com.lutris.appserver.server.httpPresentation.*;
35  
36  public class GenerateTopError implements HttpPresentation {
37      private static final String title = "Harmony Presentation Manager Error Tests";
38  
39      public void run(HttpPresentationComms comms) throws Exception {
40          comms.response.setContentType("text/html");
41          
42          
43          String last = comms.request.getParameter("LAST_ERROR_HANDLER");
44          if (last == null) {
45              last = "not specified!";
46          }
47  
48          HttpPresentationOutputStream out = comms.response.getOutputStream();
49          out.println("<TITLE>" + title + "</TITLE>");
50          out.println("<H1>" + title + "</H1>");
51          out.println("<CENTER>Original error, generated by: " + this.getClass().getName());
52          out.println("<BR>LAST_ERROR_HANDLER = " + last + "</CENTER><HR>");
53  
54          throw new Exception("error from: " + this.getClass().getName());
55      }
56  }