KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > commons > latka > servlet > ViewSuiteServlet


1 /*
2  * Copyright 1999-2001,2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package org.apache.commons.latka.servlet;
18
19 import java.io.IOException JavaDoc;
20 import java.io.PrintWriter JavaDoc;
21
22 import java.net.URL JavaDoc;
23
24 import javax.servlet.http.HttpServlet JavaDoc;
25 import javax.servlet.http.HttpServletRequest JavaDoc;
26 import javax.servlet.http.HttpServletResponse JavaDoc;
27
28 import org.apache.commons.latka.Suite;
29
30 /**
31  * A servlet to view the Latka Suite
32  *
33  * @author Morgan Delagrange
34  * @version $Id: ViewSuiteServlet.java 155424 2005-02-26 13:09:29Z dirkv $
35  */

36 public class ViewSuiteServlet extends HttpServlet JavaDoc {
37   
38     /**
39      * perform a get request
40      *
41      * @param req the http request
42      * @param res the http response
43      * @throws IOException when an error occurs writing the response
44      */

45     public void doPost(HttpServletRequest JavaDoc req, HttpServletResponse JavaDoc res)
46         throws IOException JavaDoc {
47         doGet(req, res);
48     }
49
50     /**
51      * Perform a get request
52      *
53      * @param req the http request
54      * @param res the http response
55      * @throws IOException when an error occurs writing the response
56      */

57     public void doGet(HttpServletRequest JavaDoc req, HttpServletResponse JavaDoc res)
58         throws IOException JavaDoc {
59
60         res.setHeader("Content-type", "text/xml");
61         
62         String JavaDoc suiteUrl = req.getParameter("url");
63         Suite suite = new Suite(new URL JavaDoc(suiteUrl));
64
65         PrintWriter JavaDoc writer = res.getWriter();
66         writer.print("not yet implemented");
67   }
68
69 }
70
Popular Tags