KickJava   Java API By Example, From Geeks To Geeks.

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


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 2
25  *
26  * @author Jorg Janke
27  * @version $Id: Test2.java,v 1.1.1.1 2002/10/12 01:06:54 jjanke Exp $
28  */

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

34     public void init(ServletConfig config) throws ServletException
35     {
36         super.init(config);
37         WEnv.initWeb(config);
38     } // init
39

40     /**
41      * Process the HTTP Get request
42      */

43     public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
44     {
45         RequestDispatcher dispatcher = request.getRequestDispatcher("Test");
46         dispatcher.forward(request, response);
47     } // doGet
48

49
50     /**
51      * Process the HTTP Post request
52      */

53     public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
54     {
55         WDoc doc = WDoc.create ("Get Request Test2");
56         //
57
WUtil.createResponse(request, response, this, null, doc, true);
58     } // doPost
59

60 } // Test2
61
Popular Tags