01: /******************************************************************************
02: * ResponderSERVERINFO.java
03: * ****************************************************************************/package org.openlaszlo.servlets.responders;
04:
05: import java.io.*;
06: import java.util.Properties;
07: import javax.servlet.ServletConfig;
08: import javax.servlet.ServletException;
09: import javax.servlet.ServletOutputStream;
10: import javax.servlet.http.HttpServletRequest;
11: import javax.servlet.http.HttpServletResponse;
12: import org.openlaszlo.server.LPS;
13: import org.openlaszlo.utils.FileUtils;
14: import org.apache.log4j.Logger;
15:
16: public final class ResponderSERVERINFO extends ResponderAdmin {
17: private static Logger mLogger = Logger
18: .getLogger(ResponderSERVERINFO.class);
19:
20: protected void respondAdmin(HttpServletRequest req,
21: HttpServletResponse res) throws IOException {
22: ServletOutputStream out = res.getOutputStream();
23: try {
24: res.setContentType("text/xml");
25: out.println(LPS.getInfo(req, mContext, "lps-server-info"));
26: } finally {
27: FileUtils.close(out);
28: }
29: }
30:
31: public int getMimeType() {
32: return MIME_TYPE_XML;
33: }
34: }
|