KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > openlaszlo > servlets > responders > ResponderSERVERINFO


1 /******************************************************************************
2  * ResponderSERVERINFO.java
3  * ****************************************************************************/

4
5 /* J_LZ_COPYRIGHT_BEGIN *******************************************************
6 * Copyright 2001-2004 Laszlo Systems, Inc. All Rights Reserved. *
7 * Use is subject to license terms. *
8 * J_LZ_COPYRIGHT_END *********************************************************/

9
10 package org.openlaszlo.servlets.responders;
11
12 import java.io.*;
13 import java.util.Properties JavaDoc;
14 import javax.servlet.ServletConfig JavaDoc;
15 import javax.servlet.ServletException JavaDoc;
16 import javax.servlet.ServletOutputStream JavaDoc;
17 import javax.servlet.http.HttpServletRequest JavaDoc;
18 import javax.servlet.http.HttpServletResponse JavaDoc;
19 import org.openlaszlo.server.LPS;
20 import org.openlaszlo.utils.FileUtils;
21 import org.apache.log4j.Logger;
22
23 public final class ResponderSERVERINFO extends ResponderAdmin
24 {
25     private static Logger mLogger = Logger.getLogger(ResponderSERVERINFO.class);
26
27     protected void respondAdmin(HttpServletRequest JavaDoc req, HttpServletResponse JavaDoc res)
28         throws IOException
29     {
30         ServletOutputStream JavaDoc out = res.getOutputStream();
31         try {
32             res.setContentType("text/xml");
33             out.println(LPS.getInfo(req, mContext, "lps-server-info"));
34         } finally {
35             FileUtils.close(out);
36         }
37     }
38
39     public int getMimeType()
40     {
41         return MIME_TYPE_XML;
42     }
43 }
44
Popular Tags