01: /* Copyright 2004 The JA-SIG Collaborative. All rights reserved.
02: * See license distributed with this file and
03: * available online at http://www.uportal.org/license.html
04: */
05:
06: package org.jasig.portal.properties;
07:
08: import java.io.IOException;
09: import java.io.PrintWriter;
10: import java.util.Iterator;
11: import java.util.Set;
12:
13: import javax.servlet.ServletException;
14: import javax.servlet.http.HttpServlet;
15: import javax.servlet.http.HttpServletRequest;
16: import javax.servlet.http.HttpServletResponse;
17:
18: /**
19: * A servlet that reports missing properties.
20: * Exposes as XML the list of properties the PropertiesManager
21: * has been asked about but for which it has no values.
22: * @author andrew.petro@yale.edu
23: * @version $Revision: 35696 $ $Date: 2005-04-30 13:09:41 -0700 (Sat, 30 Apr 2005) $
24: * @since uPortal 2.4
25: * @deprecated No longer necessary since CMissingProperties was introduced in uPortal 2.5.
26: */
27: public class MissingPropertiesServlet extends HttpServlet {
28:
29: protected void doGet(HttpServletRequest request,
30: HttpServletResponse response) throws ServletException,
31: IOException {
32:
33: response.setContentType("text/xml");
34: PrintWriter out = response.getWriter();
35: out.println("<?xml version=\"1.0\" ?>");
36: out.println("<missingProperties>");
37:
38: Set missingProperties = PropertiesManager
39: .getMissingProperties();
40:
41: for (Iterator iter = missingProperties.iterator(); iter
42: .hasNext();) {
43: out.println("<property>");
44: out.println(iter.next());
45: out.println("</property>");
46: }
47:
48: out.println("</missingProperties>");
49: }
50: }
|