KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > compiere > www > Test


1 /******************************************************************************
2  * The contents of this file are subject to the Compiere License Version 1.1
3  * ("License"); You may not use this file except in compliance with the License
4  * You may obtain a copy of the License at http://www.compiere.org/license.html
5  * Software distributed under the License is distributed on an "AS IS" basis,
6  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
7  * the specific language governing rights and limitations under the License.
8  * The Original Code is Compiere ERP & CRM Business Solution
9  * The Initial Developer of the Original Code is Jorg Janke and ComPiere, Inc.
10  * Portions created by Jorg Janke are Copyright (C) 1999-2001 Jorg Janke, parts
11  * created by ComPiere are Copyright (C) ComPiere, Inc.; All Rights Reserved.
12  * Contributor(s): ______________________________________.
13  *****************************************************************************/

14 package org.compiere.www;
15
16 import javax.servlet.*;
17 import javax.servlet.http.*;
18 import java.io.*;
19 import java.util.*;
20
21 import org.apache.ecs.xhtml.*;
22
23 /**
24  * Test Servlet
25  *
26  * @author Jorg Janke
27  * @version $Id: Test.java,v 1.1.1.1 2002/10/12 01:06:54 jjanke Exp $
28  */

29 public class Test extends HttpServlet
30 {
31     /**
32      * Initialize global variables
33      */

34     public void init(ServletConfig config)
35         throws ServletException
36     {
37         super.init(config);
38         if (!WEnv.initWeb(config))
39             throw new ServletException("Test.init");
40     } // init
41

42     /**
43      * Process the HTTP Get request
44      */

45     public void doGet(HttpServletRequest request, HttpServletResponse response)
46         throws ServletException, IOException
47     {
48         WDoc doc = WDoc.create ("Get Request Test");
49         //
50
WUtil.createResponse(request, response, this, null, doc, true);
51     } // doGet
52

53
54     /**
55      * Process the HTTP Post request
56      */

57     public void doPost(HttpServletRequest request, HttpServletResponse response)
58         throws ServletException, IOException
59     {
60         WDoc doc = WDoc.create ("Post Request Test");
61         //
62
WUtil.createResponse(request, response, this, null, doc, true);
63     } // doPost
64

65 } // Test
66
Popular Tags