3 * see AUTHORS for the list of contributors
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 package org.sonews.web;
21 import java.io.IOException;
22 import javax.servlet.http.HttpServletRequest;
23 import javax.servlet.http.HttpServletResponse;
24 import org.sonews.util.StringTemplate;
27 * Views the group settings and allows editing.
28 * @author Christian Lins
31 public class SonewsGroupServlet extends AbstractSonewsServlet
35 public void doGet(HttpServletRequest req, HttpServletResponse resp)
40 connectToNewsserver();
41 String name = req.getParameter("name");
42 String action = req.getParameter("action");
44 if("set_flags".equals(action))
48 else if("set_mladdress".equals(action))
53 StringTemplate tmpl = getTemplate("SonewsGroupServlet.tmpl");
54 tmpl.set("SERVERNAME", hello.split(" ")[2]);
55 tmpl.set("TITLE", "Group " + name);
56 tmpl.set("GROUPNAME", name);
58 resp.getWriter().println(tmpl.toString());
59 resp.getWriter().flush();
60 resp.setStatus(HttpServletResponse.SC_OK);
62 disconnectFromNewsserver();