2
package com.eireneh.bible.view.servlet;
6
import javax.servlet.http.*;
10
import com.eireneh.config.*;
11
import com.eireneh.config.servlet.*;
13
import com.eireneh.bible.util.*;
14
import com.eireneh.bible.control.*;
17
* The simplest possible servlet.
19
* <table border='1' cellPadding='3' cellSpacing='0' width="100%">
20
* <tr><td bgColor='white'class='TableRowColor'><font size='-7'>
21
* Distribution Licence:<br />
22
* Project B is free software; you can redistribute it
23
* and/or modify it under the terms of the GNU General Public License,
24
* version 2 as published by the Free Software Foundation.<br />
25
* This program is distributed in the hope that it will be useful,
26
* but WITHOUT ANY WARRANTY; without even the implied warranty of
27
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
28
* General Public License for more details.<br />
29
* The License is available on the internet
30
* <a href='http://www.gnu.org/copyleft/gpl.html'>here</a>, by writing to
31
* <i>Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
32
* MA 02111-1307, USA</i>, Or locally at the Licence link below.<br />
33
* The copyright to this program is held by it's authors.
34
* </font></td></tr></table>
35
* @see <a href='http://www.eireneh.com/servlets/Web'>Project B Home</a>
39
public class Config2 extends BaseServlet
42
* Enter elements into an XML Document that can be transformed into
43
* an HTML document using XSL
44
* @param state data about the current request
45
* @param node The place to start adding data
46
* @param request A description of the request
48
public void generateData(State state, Node node, HttpServletRequest request) throws Exception
50
Config config = state.getConfig();
52
// Where do we want to return to
53
String last_path = null;
54
Enumeration en = config.getNames();
55
while (en.hasMoreElements())
57
String key = (String) en.nextElement();
58
String value = request.getParameter(key);
59
if (value == null) value = "";
60
config.setLocal(key, value);
61
config.localToApplication(false);
65
String caller = request.getParameter("source");
66
if (caller == null) caller = "sweb";
68
ConfigDocument confdoc = new ConfigDocument(config);
69
confdoc.generateReportData(node, caller);